Home > linux基础 > cat tac nl命令

cat tac nl命令

[[email protected] unixftp]# cat /etc/issue
CentOS release 6.6 (Final)
Kernel \r on an \m

[[email protected] unixftp]# cat -n /etc/issue
1 CentOS release 6.6 (Final)
2 Kernel \r on an \m
3
[[email protected] unixftp]# tac /etc/issue

Kernel \r on an \m
CentOS release 6.6 (Final)

[[email protected] unixftp]# nl -b a /etc/issue
1 CentOS release 6.6 (Final)
2 Kernel \r on an \m
3
[[email protected] unixftp]# nl -b a -n rz /etc/issue
000001 CentOS release 6.6 (Final)
000002 Kernel \r on an \m
000003
[[email protected] unixftp]# nl -b a -n rz -w 3 /etc/issue
001 CentOS release 6.6 (Final)
002 Kernel \r on an \m
003

  • cat  由第一行开始显示文件内容
  • tac  从最后一行开始显示,可以看出 tac 是 cat 的倒著写!
  • nl   显示的时候,顺道输出行号!

若非注明,本博客内容均为原创或翻译自Linode Library,教程默认Centos为linux发行版,转载请注明转自linode中文教程www.linode.im。linode中文教程QQ群:185393826,一起讨论linode及linux,linode中文教程、linode代购、linode合租、linode推介、linode返佣、linode优惠。日本VPS、美国VPS、海外独立服务器代购均在linode.im。

Categories: linux基础 Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.