Menu

How to use tail with cat(concatenate) in unix/linux

While reading a huge content file its difficult to find the thing in a file or load/show only the specific line of content on the screen. Here we will see how we could use trail with cat command. 


View last 10 lines of the file:

cat filename -n | tail -n 10

View line 31 to 50 of the file.

cat filename -n | head -n 50 | tail -n 20

No comments:

Post a Comment