In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 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 find command to find and search files, I hope you will learn a lot after reading this article, let's discuss it together!
A file or directory that the find command can find based on a given path and expression. There are many options for find parameters, and they support regular and powerful functions. Combined with pipeline, complex functions can be realized, and it is a command that system managers and ordinary users must master.
If find does not add any parameters, it means to find all files and directories under the current path. If the server load is high, try not to use the find command during the peak period. Find command fuzzy search still consumes system resources.
Syntax format: find [parameters] [path] [find and search scope]
Common parameters:
-name by name-size by size-user by attribute-type by type-iname ignores case
Reference example
Use the-name parameter to view all the configuration files ending with .conf under the / etc directory:
[root@linuxcool ~] # find / etc-name "* .conf
Use the-size parameter to view files larger than 1m under the / etc directory:
[root@linuxcool ~] # find / etc-size + 1m
Find all files in the current user's home directory:
[root@linuxcool ~] # find $HOME-print
List all files and folders in the current directory and subdirectories:
[root@linuxcool] # find.
Look for file names ending in .txt in the / home directory:
[root@linuxcool ~] # find / home-name "* .txt"
Ignore case in the / var/log directory to find a file name that ends in .log:
[root@linuxcool ~] # find / var/log-iname "* .log"
Search all files that have been accessed in more than seven days:
[root@linuxcool] # find. -type f-atime + 7
Search all files that have been accessed for more than 10 minutes:
[root@linuxcool] # find. -type f-amin + 10
Find files under / home that do not end in .txt:
[root@linuxcool] # find / home!-name "*. Txt" after reading this article, I believe you have some understanding of using linux's find command to find and search documents. You want to know more about it. Welcome to follow the industry information channel. Thank you for your reading!
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
Exchange 2013 (VII) High availability of Mailbox servers
© 2024 shulou.com SLNews company. All rights reserved.