How to get special lines data from file (Linux)

If you want to get file’s head lines, you can use:

$ head FILE

If you want to get file’s footer lines, you can use:

$ tail FILE

If you want to print some line that they not in first part or last part of file, you can use:

$ more +num10 FILE | head -n20

The above command print from line 10 to 30 (20 lines) of FILE

Related posts:

  1. Linux and UNIX bash shell aliases

Saeid Zebardast

facebook twitter linkedin Email

I'm Senior software engineer with 5+ years of professional experience includes cross-platform proficiency with considerable knowledge of programming languages especially Java and programming paradigms such as OO and development methodologies. Also I'm MySQL DBA since 2006.


Comments
Leave a Comment