cat:concatenate files and print on the standard output合并文件并输出 主要用法 1.cat f1.txt,查看f1.txt文件的内容. 2.cat -n f1.txt,查看f1.txt文件的内容,并且由1开始对所有输出行进行编号. 3.cat -b f1.txt,查看f1.txt文件的内容,用法与-n相似,只不过对于空白行不编号. 4.cat -s f1.txt,当遇到有连续两行或两行以上的空白行,就代换为一行的空白行. 5.cat -e f
cat VS tac cat是查看文本文件的内容,tac是cat反过来,反向查看文件 $cat 1.txt ls: cannot access ee: No such file or directory 1line 2line 3line 4line $tac 1.txt 4line 3line 2line 1line ls: cannot access ee: No such file or directory more 查看,扩展翻页,回车下一行,空格下一页,q退出 $man ls | mo
命令基于centos6系列,翻译基于官方原文的意思. catcat - concatenatefiles 1117.www.qixoo.qixoo.com and print on the standard output连接文件和打印标准输出cat [OPTION]...[FILE]...DESCRIPTION描述 Concatenate FILE(s), or standard input,to standard output. -A, --show-all
Cat stands for concatenate. Case 1. When the text files have more blank lines, we want to remove them. We can use regex \s+ '\n'. cat file.txt | tr \s '\n' cat -T file.txt # show tabs as ^. cat -n file.txt # show line numbers . Specifies current dire