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

  • 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?
主站蜘蛛池模板: 竹北市| 宁陕县| 永年县| 射洪县| 轮台县| 东兴市| 永春县| 大兴区| 石渠县| 高州市| 延吉市| 玉田县| 沽源县| 甘洛县| 吉林市| 博爱县| 巍山| 吴江市| 湾仔区| 邵阳县| 棋牌| 武夷山市| 随州市| 洛南县| 贡觉县| 民乐县| 辛集市| 日照市| 周口市| 鲁山县| 荔浦县| 自治县| 尼玛县| 元谋县| 腾冲县| 洛扎县| 玉溪市| 遂宁市| 瑞安市| 彭水| 巫山县|