5.13 查看多个文件的最后10行内容
tail file1 file2
使用head
命令可以一次查看多个文件的前10行内容,同样,使用tail
命令也可以做类似的事,这一点儿也不奇怪。
$ tail Paradise_Lost.txt Miller's_Tale.txt
==> Paradise_Lost.txt <==
To the subjected plain - then disappeared
They, looking back, all the eastern side beheld
Of Paradise, so late their happy seat,
Waved over by that flaming brand; the gate
With dreadful faces thronged and fiery arms.
Some natural tears they dropped, but wiped them soon;
The world was all before them, where to choose
Their place of rest, and Providence their guide.
They, hand in hand, with wandering steps and slow,
Through Eden took their solitary way.
==> Miller's_Tale.txt <==
With othes grete he was so sworn adoun
That he was holde wood in al the toun;
For every clerk anonright heeld with oother.
They seyde, “The man is wood, my leeve brother”;
And every wight gan laughen at this stryf.
Thus swyved was this carpenteris wyf,
For al his kepyng and his jalousye;
And Absolon hath kist hir nether ye;
And Nicholas is scalded in the towte.
This tale is doon, and God save al the rowte!
和head
命令一样,tail
命令也使用标题(分隔符)来分隔不同的文件,这非常有用。