In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the use of linux's head command to display the beginning of the file, I hope you will learn a lot after reading this article, let's discuss it together!
The head command fetches the contents of the file in behavior units, and prints the first 10 lines by default without parameters.
Syntax format: head [parameters] [file]
Common parameters:
-n is followed by a number, which means how many lines to display-c specifies the number of characters to display high-quality content-v always displays the header information of the file name-Q does not display the header information of the file name
Reference example
Display the contents of the first 3 lines of the file:
[root@linuxcool] # head-n 3 install.logInstalling libgcc-4.4.7-23.el6.x86_64warning: libgcc-4.4.7-23.el6.x86_64: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEYInstalling setup-2.8.14-23.el6.noarch
Displays the file name information and the first two lines of the file:
[root@linuxcool] # head-v-n 2 test.txt = = > test.txt
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.