wc命令:
wc - print newline, word, and byte counts for each file
wc [OPTION]... [FILE]...
-l:行数
-w:单词数
-c:字节数
cut命令:
cut - remove sections from each line of files
cut OPTION... [FILE]...
-d CHAR:以指定的字符为输入分隔符;默认为空白字符;
-f FILEDS:挑选出的字段;
#:指定的单个字段;
#,#:离散的多个字段;例如1,3,7;
#-#:连续的多个字段,例如4-7;
--output-delimiter= :输出分隔符;
sort [OPTION]... [FILE]...
-r, --reverse:逆序排序;
-u, --unique:相同的行只保留一次;连续且完全一样方为相同;
-t CHAR:指定分隔符;
-k #:用于做排序的字段;
-n, --numeric-sort:基于数值大小进行比较;
-f, --ignore-case:比较时忽略字符大小写;
uniq [OPTION]... [INPUT [OUTPUT]]
-d, --repeated:仅显示重复的行;
-u, --unique:仅显示不曾重复的行;
diff命令:
diff - compare files line by line
diff [OPTION]... FILES
选项:
patch命令:
patch - apply changes to files
patch [-d dir] [-i patchfile] [-p num] [file]
-i /PATH/FROM/PATCH_FILE:指明补丁文件路径;
-R or --reverse:还原;
wc - print newline, word, and byte counts for each file
wc [OPTION]... [FILE]...
-l:行数
-w:单词数
-c:字节数
cut命令:
cut - remove sections from each line of files
cut OPTION... [FILE]...
-d CHAR:以指定的字符为输入分隔符;默认为空白字符;
-f FILEDS:挑选出的字段;
#:指定的单个字段;
#,#:离散的多个字段;例如1,3,7;
#-#:连续的多个字段,例如4-7;
--output-delimiter= :输出分隔符;
sort命令:
sort - sort lines of text filessort [OPTION]... [FILE]...
-r, --reverse:逆序排序;
-u, --unique:相同的行只保留一次;连续且完全一样方为相同;
-t CHAR:指定分隔符;
-k #:用于做排序的字段;
-n, --numeric-sort:基于数值大小进行比较;
-f, --ignore-case:比较时忽略字符大小写;
uniq [OPTION]... [INPUT [OUTPUT]]
-d, --repeated:仅显示重复的行;
-u, --unique:仅显示不曾重复的行;
-c, --count:在每行的行首显示其出现的次数;
diff命令:
diff - compare files line by line
diff [OPTION]... FILES
选项:
-u:使用unified机制,即显示要修改的行上下文,默认为3行;
patch命令:
patch - apply changes to files
patch [-d dir] [-i patchfile] [-p num] [file]
-i /PATH/FROM/PATCH_FILE:指明补丁文件路径;
-R or --reverse:还原;