4/08/2009

screen on freeBSD

指令:
//進入screen程式
# screen
//以下^A表示同按"Ctrl + A"鍵
# ^A c //Create,開出新的 window
# ^A n //Next,切換到下個 window
# ^A p //Previous,前一個 window
# ^A ^A //在兩個 window 間切換
# ^A w //Windows,列出已開啟的 windows 有那些
# ^A 0...9 //切換到第 0..9 個 window
# ^A t //Time,顯示目前的時間,與系統的 load
# ^A K //kill window,強制關掉目前的 window
# ^A ? //Help,顯示簡單說明
# ^A d //detach,將目前的 screen session (可能含有多個 windows) 丟到背景執行
當按了 ^A d 把 screen session detach 掉後,會回到還沒進 screen 時的狀態,此時在 screen session ?每個 window 內跑的 process (無論是前景/背景)都在繼續執行,即使 logout 也不影響。
# screen -ls //顯示所有的 screen sessions
# screen -r [keyword] //挑個 screen session 回來 (撿回來)

更多說明請參考原作者發文:
http://www.freebsd.org.hk/html/bsd/9/3/3.html

4/07/2009

how to set freeBSD ls color

it's just the normal note.
not so big deal.
1. frist install gnuls:
cd /usr/ports/misc/gnuls
make all install clean
2. vi ~/.tcshrc and add the following line
alias ls 'gnuls --color=auto --show-control-chars'
3. login again and finish.