Monday, December 29, 2014

How to use Tail,Head,More,less Commands ?


Tail Commands :-


tail  is used to  output the last part of files
# tail <filename>                         It willl list the last part of files.
# tail -f <filename>                     It will list the  output appended data as the file grows
#cat /var/log/messages |tail -5    It will list last 5 files







Head Commands :- 


head Is used to output the first part of files
#head <filename>
#cat /var/log/messages | head -5 






more Command :- 

more <filename>




Less Command :-



  less <filename>