没有合适的资源?快使用搜索试试~ 我知道了~
Linux文本查看命令及其选项详解(cat,head,tail)
2 下载量 37 浏览量
2021-01-09
00:41:57
上传
评论
收藏 41KB PDF 举报
温馨提示
试读
3页
linux系统内置命令可以通过以下两种方式查询:“cat –help” 或者“man cat”。 cat命令的常用选项和官方解释如下: cat file_name 显示文件全部内容 cat -b file_name 显示文件非空行内容 cat -E file_name 在文件每行末尾显示$,常用于管道功能 cat -n file_name 显示内容和行号 Usage: cat [OPTION]... [FILE]... Concatenate FILE(s) to standard output. With no FILE, or when FILE is -, read standard
资源详情
资源评论
资源推荐
Linux文本查看命令及其选项详解(文本查看命令及其选项详解(cat,head,tail))
linux系统内置命令可以通过以下两种方式查询:“cat –help” 或者“man cat”。
cat命令的常用选项和官方解释如下:
cat file_name 显示文件全部内容
cat -b file_name 显示文件非空行内容
cat -E file_name 在文件每行末尾显示$,常用于管道功能
cat -n file_name 显示内容和行号
Usage: cat [OPTION]... [FILE]...
Concatenate FILE(s) to standard output.
With no FILE, or when FILE is -, read standard input.
-A, --show-all equivalent to -vET
-b, --number-nonblank number nonempty output lines, overrides -n
-e equivalent to -vE
-E, --show-ends display $ at end of each line
-n, --number number all output lines
-s, --squeeze-blank suppress repeated empty output lines
-t equivalent to -vT
-T, --show-tabs display TAB characters as ^I
-u (ignored)
-v, --show-nonprinting use ^ and M- notation, except for LFD and TAB
--help display this help and exit
--version output version information and exit
Examples:
cat f - g Output f's contents, then standard input, then g's contents.
cat Copy standard input to standard output.
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Full documentation at: http://www.gnu.org/software/coreutils/cat
head命令及其选项如下:
head -c10 file_name 显示一开始的10个字节
head -c-10 file_name 显示除末尾10个字节之外的内容
head -n10 file_name 显示一开始的10行内容
head -n-10 file_name 显示除末尾的10行之外的内容
Usage: head [OPTION]... [FILE]...
Print the first 10 lines of each FILE to standard output.
With more than one FILE, precede each with a header giving the file name.
With no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-c, --bytes=[-]NUM print the first NUM bytes of each file;
with the leading '-', print all but the last
NUM bytes of each file
-n, --lines=[-]NUM print the first NUM lines instead of the first 10;
with the leading '-', print all but the last
NUM lines of each file
-q, --quiet, --silent never print headers giving file names
-v, --verbose always print headers giving file names
-z, --zero-terminated line delimiter is NUL, not newline
--help display this help and exit
--version output version information and exit
NUM may have a multiplier suffix:
weixin_38685521
- 粉丝: 3
- 资源: 935
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0