cat??concatenate files and print on the standard output
Linux中一個最簡單的且最常用的命令是cat命令。其功能是在終端設備上顯示文件內容。
cat命令-n選項用于顯示行號。
tac?concatenate and print files in reverse
tac命令的功能是用于反向顯示文件內容,即常見的查看文件內容命令cat的反寫形式。
?
more? file perusal filter for crt viewing?
more命令的功能是分頁顯示文本文件的內容。
less? opposite of more
less命令的功能是分頁顯示文件內容。Less命令分頁顯示的功能與more命令很相像,但more命令只能從前向后瀏覽文件內容,而less命令不僅能從前向后瀏覽(按PageDown鍵),還可以從后向前瀏覽(按PageUp鍵),更加靈?活。
head??output the first part of files
head命令的功能是顯示文件開頭的內容,默認為前10行。
?head命令-n選項用于輸出指定行數的內容;
tail?output the last part of files
tail命令的功能是查看文件尾部內容,例如默認會在終端界面上顯示指定文件的末尾10行,如果指定了多個文件,則會在顯示的每個文件內容前面加上文件名來加以區分。
?tail命令-n選項用于輸出指定行數的內容(從末尾開始)
file??determine file type
file命令的功能是識別文件類型,也可以用來辨別一些內容的編碼格式。
?
[root@localhost ~]# file /etc/passwd
/etc/passwd: ASCII text
[root@localhost ~]# file /etc/
/etc/: directory