Linux文件查看


列出行號

[[email protected] tmp]# cat /etc/passwd

[[email protected] tmp]# cat -b /etc/passwd

顯示$符號

[[email protected] tmp]# cat -E /etc/passwd
root:x:0:0:root:/root:/bin/bash$
bin:x:1:1:bin:/bin:/sbin/nologin$
daemon:x:2:2:daemon:/sbin:/sbin/nologin$

adm:x:3:4:adm:/var/adm:/sbin/nologin$

顯示行號,不過會把空白行也計算在內

[[email protected] tmp]# cat -n /etc/passwd

cat列出信息,tac的方式是將cat倒過來顯示

[[email protected] tmp]# cat /etc/passwd

[[email protected] tmp]# tac /etc/passwd


列出行號

[[email protected] tmp]# nl /etc/passwd

縮進20個字符

[[email protected] tmp]# nl -w 20 /etc/passwd


列出文件以第一行顯示在頁面上,閱讀完第一頁後按下 space 鍵閱讀下一頁,按下回車閱讀下一行,往上翻頁按下B鍵.

[[email protected] tmp]# more /etc/man_db.conf

#
# This file is used by the man-db package to configure the man and cat paths.
# It is also used to provide a manpath for those without one by examining
# their PATH environment variable. For details see the manpath(5) man page.
#
# Lines beginning with `#' are comments and are ignored. Any combination of
# tabs or spaces may be used as `whitespace' separators.
#
# There are three mappings allowed in this file:
# --------------------------------------------------------
# MANDATORY_MANPATH manpath_element
# MANPATH_MAP path_element manpath_element
# MANDB_MAP global_manpath [relative_catpath]
#---------------------------------------------------------
# every automatically generated MANPATH includes these fields
#
#MANDATORY_MANPATH /usr/src/pvm3/man
#
MANDATORY_MANPATH /usr/man
MANDATORY_MANPATH /usr/share/man
MANDATORY_MANPATH /usr/local/share/man
#---------------------------------------------------------
# set up PATH to MANPATH mapping

# ie. what man tree holds man pages for what binary directory.