搜尋此網誌

2012年5月20日 星期日

tree -a

好用的tree -a 指令

list contents of directories in a tree-like format.

 -a     All  files  are  printed.  By default tree does not print hidden files
              (those beginning with a dot `.').  In no event  does  tree  print  the
              file  system  constructs  `.'  (current  directory) and `..' (previous
              directory).

2012年5月16日 星期三

連線ssh不用密碼

參考網址

ssh-keygen -t rsa

scp /home/parks/.ssh/id_rsa.pub parks@192.168.1.195:~/.ssh/


ssh parks@192.168.1.195

cat .ssh/id_rsa.pub >> .ssh/authorized_keys

chmod 600 ~/.ssh/authorized_keys

這樣就可以直接連線不用密碼了

用cat指令新建檔案



用 cat 建立文件並且輸入內容,
使用指令:

cat > userdoc  

就會建立建立文件userdoc

然後輸入你的文件內容, 
結束按ctrl + d 終止輸入,

文件就建立好了!