In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "the use of the find command under the Linux system". In the daily operation, I believe that many people have doubts about the use of the find command under the Linux system. The editor consulted all kinds of materials and sorted out a simple and easy-to-use operation method. I hope it will be helpful to answer the doubts about the use of the find command under the Linux system. Next, please follow the editor to study!
Find command
1. Time-related commands
-atime n: n is a number, meaning files that have been accessed (access) within a day before n days.
-ctime n: n is a number, meaning a file that has been modified (change) within one day before n days.
-mtime n: n is a number, meaning a file that has been modified (modification) within one day before n days.
-newer file: file is an existing file, meaning that as long as the file is newer than file, it will be listed.
two。 Parameters related to the user or user group name:
-uid n: n is a number, which is the user's account number ID, or UID, and the UID is recorded in / etc/passwd corresponding to the account name.
-gid n: n is a number, which is the ID of the user group name, or GID, and this GID is recorded in / etc/group.
-user name: name is the user account name, such as dmtsai
-group name: name is the name of the user group, such as users
-nouser: the owner of the lookup file is not in / etc/passwd
-nogroup: find files whose owner is not in / etc/group.
3. Parameters related to file permissions and names:
-name filename: search for a file named filename
-size [+ -] SIZE: search for files larger (+) or smaller (-) than SIZE. The specifications of this SIZE are: C: for byte,k: for 1024bytes, so to find a file larger than 50KB, it is "- size + 50K"
-type TYPE: the type of search file is TYPE, and the main types are: general formal file (f), device file (bjournal c), directory (d), connection file (l), socket (s), and FIFO (p) and other attributes.
-perm mode: search for files whose attribute "happens to be" mode, which mode is similar to chmod. For example, if the attribute of-rwsr-xr-x is 4755, it will be listed.
-perm + mode: search for files whose file attribute "contains the attributes of any mode". For example, when we search for-rwxr-xr-x, that is,-perm + 755, but a file attribute of-rw- will also be listed because it has-rw.... The attribute of exists.
4. Additional actions:
-exec command: command is another command,-exec can be followed by additional commands to process the search results.
-print: print out the result. This is the default action.
At this point, the study on "the use of find commands under the Linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.