Total Pageviews

Sunday 12 September 2021

head和tail的用法

浏览文件前几行:head

1
2
head /etc/services	#默认显示前十行
head -n 7 /etc/services #显示前七行


浏览文件末尾几行:tail

1
2
3
tail /etc/services	#显示末尾几行
tail -n 7 /etc/services #显示末尾的7行

No comments:

Post a Comment