- 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?
推薦閱讀
- 深入理解Bootstrap
- 零基礎學Scratch少兒編程:小學課本中的Scratch創意編程
- JavaScript+jQuery網頁特效設計任務驅動教程(第2版)
- Cross-platform Desktop Application Development:Electron,Node,NW.js,and React
- 我的第一本算法書
- Unity 5 for Android Essentials
- Arduino計算機視覺編程
- QGIS 2 Cookbook
- Node.js區塊鏈開發
- Mastering VMware Horizon 7(Second Edition)
- Java 9 with JShell
- Learning SaltStack(Second Edition)
- WCF 4.5 Multi-Layer Services Development with Entity Framework(Third Edition)
- C#編程魔法書
- Hadoop MapReduce v2 Cookbook(Second Edition)