728x90 AdSpace

Latest News
Friday, April 5, 2013

Head and Tail - Linux commands

Head and Tail Command - Linux

Head and Tail are the most used file commands in linux

Head command will display the first few lines of the file

Tail command will display the last few lines of the file

Syntax :

head filename -> this will display the first 10 lines of a file

tail filename -> this will display the last 10 lines of a file

If you want to see only few lines you can use this sytanx

head -n filename -> this will display only first few specified value of lines

tail -n filename -> this will display only last few specified values of lines

Generally if the file is too large and you just wana know what it is you can use head command to view first few lines and guess what the file is about

If you have large size report document and you want to see only the final report you can use tail command to view the conclusion of the report

Generally the check the log of request ppl use head and tail commands

Try out these linux commands

Happy Week end Guys..!!


Praveen Kumar Rajendran
CollabNet Software Private Limited, Chennai
  • Blogger Comments
  • Facebook Comments

0 comments:

Post a Comment

Item Reviewed: Head and Tail - Linux commands Rating: 5 Reviewed By: Praveen Kumar Rajendran