Tuesday, August 18, 2015

dynamic watch the log results

When your log continue to generate new results, you can use the following command in Linux console/terminal to see the last results every 1 second


  • watch -n 1 tail [file name]

Tuesday, August 11, 2015

Tuesday, July 21, 2015

configure the auto-scheduler

crontab -e

// this command in crontab will be executed at 10 PM everyday
* 22 * * * python test.py

// this command in crontab will be executed at every 5 minutes
*/5 * * * * python test.py

crontab -l

//the alert message can check as below
vim /var/spool/mail/ping-chen.lin

Monday, May 25, 2015

OMNeT++多行註解方式

框選起來後,按下
Ctrl + /

ps.解除的方式就重複一次上述指令

Wednesday, May 13, 2015

vim 指令大全

一般模式

  • 上: k, 下: j, 左: h, 右: l

  • 復原(回到上一步動作): u
  • 重做(執行下一步動作): ctrl + r
  • 進入編輯模式: a, i, o
  • 剪下整行: dd
  • 貼上整行: yy
  • 剪下一個字: x

  • 跳到行首: ^
  • 跳到行尾: $
  • 跳到第一行: gg
  • 跳到最後一行: shift + g


  • 查看檔案路徑:  :f
  • 更新目前檔案:  :e
  • 開出水平新視窗:   :vs [檔名]
  • 設定看見(不見)行數:  :set nu (:set nonu)
  • 設定對期:  :set ai (:set noai)
  • 暫時離開: :!
  • 觀看terminal下的指令:  :! [指令]      e.g., :! grep -nr myBook *
  • 再多視窗之間轉跳: ctrl + w 在按w
  • 把現在這行指標之後的文字消除並進入編輯模式: ctrl + c


編輯模式

  • 1...


指令模式

  • 2...