官术网_书友最值得收藏!

  • Bash Cookbook
  • Ron Brash Ganesh Naik
  • 184字
  • 2021-07-23 19:17:41

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?
主站蜘蛛池模板: 陆良县| 丹凤县| 聂荣县| 静乐县| 永康市| 句容市| 牡丹江市| 宿松县| 宣汉县| 乾安县| 仁寿县| 富顺县| 遵义县| 麻栗坡县| 碌曲县| 马山县| 武夷山市| 嘉荫县| 宁海县| 留坝县| 崇州市| 武平县| 巨野县| 贡嘎县| 郯城县| 托克逊县| 中方县| 旅游| 吉水县| 昌平区| 北辰区| 涿州市| 河北省| 嘉定区| 邹平县| 南昌市| 华安县| 卢湾区| 泰宁县| 广州市| 兴义市|