Linux 发行版
Fedora, RedHat(CentOS), SUSU, Debian(Ubuntu, Mint), Gentoo, LFS(Linux From Scratch)
Command
目录管理(先前节数已经讲)
ls、cd、pwd、mkdir、rmdir、tree
文件管理(先前节数已经讲)
touch、stat、file、rm、cp、nano、mv
日期时间(先前节数已经讲)
date、clock、hwclock、cal
查看文本
cat、tac、more、less、head、tail
文本处理
cut、join(用得不多)、sed、awk
文本排序
sort、uniq
文本统计
wc
字符处理
tr
detail of Command
查看文本
cat concatenate(V.连接) files and print on the standard output
-n number all output lines
-A --show-all
-E display $ at end of each line 行结束符
tac concatenate and print files in reverse(反转)
more file perusal filter for crt viewing(和less区别到end会退出而less不会)
less opposite of more
head output the first part of files
tail output the last part of files
-f output appended data as the file grows; -f, --follow, and --fol-
low=descriptor are equivalent 查看文件尾部,等待显示后续追加内容
head/tail -n output the first/last N lines
文本处理
cut remove sections from each line of files
-d use DELIM instead of TAB for field delimiter(定界符)
-f select only these fields;
文本排序
sort sort lines of text files
-n compare according to string numerical value
-r reverse the result of comparisons(比较)
-t use SEP instead of non-blank to blank transition(字段分隔符)
-k start a key at POS1, end it at POS2 (origin 1)(从哪里开始排序)
-u 去除重复 with -c, check for strict ordering; without -c, output
only the first of an equal run
-f fold lower case to upper case characters(折叠大小写 按字翻译哈哈)
uniq report or omit repeated lines(显示相邻重复的行)
-d only print duplicate(重复) lines
-c prefix(前缀) lines by the number of occurrences 显示重复行次数
文本统计
wc print the number of newlines, words, and bytes in files
-c print the byte counts
-l print the newline counts
-w print the word counts
-L print the length of the longest line
字符处理
tr translate or delete characters
用法示例: tr 'a-z' 'A-z' < /etc/passwd 将此文件里的小字转换为大写 <此符号以后会讲
-d delete characters in SET1, do not translate
Ctrl+c 中断当前程序
Shift+Page up/down 在终端里翻页(有限会有一部分被删除)