- 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?
推薦閱讀
- Functional Python Programming
- 演進式架構(原書第2版)
- LabVIEW入門與實戰開發100例
- Java從入門到精通(第5版)
- C語言程序設計
- x86匯編語言:從實模式到保護模式(第2版)
- NGINX Cookbook
- 一本書講透Java線程:原理與實踐
- MySQL入門很輕松(微課超值版)
- 寫給大家看的Midjourney設計書
- MyBatis 3源碼深度解析
- 現代C:概念剖析和編程實踐
- Practical Predictive Analytics
- Learning ECMAScript 6
- Mastering ArcGIS Server Development with JavaScript