Viewing files from various angles – head, tail, less, and more

As of this very moment, your system likely has many text files of various sizes including a never ending log file being written too. You might even have several large files containing copious amounts of code (such as the Linux kernel or a software project) and would like to quickly view them from the console without slowing your system down to a halt.

To do this, there are four essential commands that should be able to provide you more than enough functionality for their purposes:

  • Head: Can be used to output the beginning lines of a file
  • Tail: Can be used to output the end or tail of a file (continuously as well)
  • More: A tool used as a pager to view large files page by page/line by line
  • Less: Is the same as more, but it has more features, including backwards scrolling
Sometimes, you may see the command more on embedded systems and not the less command. This is because the less command is larger than more. Does your head hurt yet?
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.47.203