In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail the method of realizing fuzzy query with linux find command. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Linux find command to achieve fuzzy query method: according to the file name fuzzy query, find the opt directory with the suffix [.log] file, the code is [find / opt/-type f-name "* .log"].
The method of realizing fuzzy query by linux find command:
Tip 1: fuzzy query based on file name: find files with the suffix .log in the opt directory
Find / opt/-type f-name "* .log"
-type f represents a file
-type d indicates a matching directory
Tip 2: find specific permission files:
Find / opt-type f-perm 755
Tip 3: find large files: (for example, find files larger than 100m in the opt directory)
Find / opt/-size + 100m
-size: indicates file size
+ means greater than a certain number
-indicates that it is less than a number.
C indicates that the units are bytes. You can change c to k _ Magi _ M _ G.
(note: when the disk space is very large, this method can quickly locate large files.)
Tip 4: find it according to time
Find / opt-mtime-10
-files modified within 10 days (+ 10 before 10 days-10 within 10 days)
Access with amin, modify with mmin, change file status with cmin
Accurate to minutes with amin,mmin,cmin to days with atime,mtime,ctime
Tip 5: find the directory in which the current directory and its subfolders belong to weblogic
Find / opt-type d-user weblogic
This is the end of this article on "the method of linux find command to achieve fuzzy query". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.