linux (17) 数据选取命令
head(取出前几行)
[root@www ~]# head [-n number] 文件
参数:
-n:后面接数字,表示显示几行的意思。
[root@www ~]# head /etc/man.config
[root@www ~]# head -n 10 /etc/man.config
tail (取出后几行)
[root@www ~]# tail [-n number] 文件
参数:
-n:后面接数字,表示显示几行的意思。
[root@www ~]# tail /etc/man.config
[root@www ~]# tail -n 20 /etc/man.config

浙公网安备 33010602011771号