In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Think big and small, and then redirect.
Linux sometimes encounters a file that is so large that the keyword search exceeds the whole screen and cannot see everything. For example, a very large log file info.log, if we want to view all logs of a certain character, it can be the same as cat info.log | grep '1711178968'. If there are too many logs, you can add time and control the number of lines. You can also use the'> > 'instruction. Cat info.log | grep '1711178968' > > temp.log temporarily save the intermediate result and view the temp.log file page by page through more, less and other tools
If it is a log with a certain time range, you can still intercept the log according to the time:
/ / intercept logs for a certain period of time sed-n'/ 2018-10-25 17 25.log 30 root.2018 41According to Grammer 2018-10-25 21 21 purge 47 purl 47 hand-10-25.log > update.log
Intercept logs between 17: 30 and 21: 47 in log 25.
View through the more instruction.
Then / ${keyword} search, such as / 1711178968, n next, b last
The above linux search for large files to specify the content of the implementation method is the editor to share with you all the content, I hope to give you a reference, but also hope that you support more.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.