1.cat 连接并显示

  -n 显示行号

  -E END 显示行尾

2.tac 从后往前显示

3.ctrl +C

4.more 向后翻  到最后会退出

5.less 翻到最后不退出 常用 支持b k space

6.head 查看前n行(默认是10)

  tail     后n行

  -n   指定行

7.cut: cut - remove sections from each line of files 影响显示

  -d :指定分隔符,默认是空格

  -f 指定要显示的字段

    -f 1,3

    -f 1-3

[root@good eric ~]# cut -d: -f1 /etc/passwd
root
bin
daemon
adm
lp
sync
shutdown
halt
mail

8.文本排序:sort

 默认按照ASCII码表排序

  -n 按大小

  -r reverse 反向

  -t 分隔符

  -k 哪个字段

  -u 去掉重复的

  -f 忽略大小写

9.uniq report or omit repeated lines

 -d, --repeated
              only print duplicate lines(只显示重复的行)
 -c, --count
              prefix lines by the number of occurrences(显示行重复的次数)

 10.文本统计  wc(word count)

  空格键也是字符

[root@good eric ~]# wc /etc/passwd
  31   45 1430 /etc/passwd
行数  单词 字节数

   -l line

  -w word

  -c chars

11.tr   tr - translate or delete characters 字符处理命令

[root@good eric tmp]# tr 'a-z'  'A-Z' < /tmp/test

 

We only live once, and time just goes by.