linux命令-head

head :output the first part of files  :輸出文件首部

head選項:

    -c ,--bytes=[-]k  :print the first K bytes of each  file;  with  the  leading  ‘-’,print all but the last K bytes of each file : 打印文件前k個字符,必須有k值,-k表示打印文件至倒數第k個字符位置,第k個字符會被打印出來。

    -n ,--lines=[-]K  :print  the first K lines instead of the first 10; with the leading ‘-’, print all but the last K lines of each file  :不加k也行,默認打印10行,-k用法同-c中的-k相同。

    


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章