2015年4月8日 星期三

head, tail

Given a list of text lines in a file, to display the first 10 lines:
To display the last 10 lines:
  • cat  由第一行開始顯示檔案內容
  • tac  從最後一行開始顯示,可以看出 tac 是 cat 的倒著寫!
  • nl   顯示的時候,順道輸出行號!
  • more 一頁一頁的顯示檔案內容
  • less 與 more 類似,但是比 more 更好的是,他可以往前翻頁!
  • head 只看頭幾行
  • tail 只看尾巴幾行
  • od   以二進位的方式讀取檔案內容!

沒有留言:

張貼留言