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

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?
主站蜘蛛池模板: 和平区| 宣威市| 聂拉木县| 苏尼特右旗| 遂宁市| 双江| 大姚县| 温州市| 凌海市| 中西区| 都兰县| 松原市| 南昌市| 金门县| 德安县| 巴里| 凉城县| 敦煌市| 巢湖市| 隆德县| 祁阳县| 沁源县| 泸水县| 彭山县| 桃园市| 景宁| 太和县| 武宣县| 成武县| 玉田县| 乌拉特后旗| 马龙县| 德化县| 萨迦县| 郴州市| 青田县| 灵台县| 微山县| 嘉善县| 双桥区| 通榆县|