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 mainly introduces the method of realizing conditional query in linux, which is very detailed and has certain reference value. Friends who are interested must finish it!
The command for conditional lookup in Linux is the find command.
The operation of the Linux- file search command find is as follows:
1. Search across the board, or specify a directory to search. Find search directory-name target name, find /-name file
2. What you see in this search is an exact match of file, case-sensitive, you can use-iname case-insensitive, find /-iname file. In this way, we can find more relevant documents in uppercase.
3. We first use the * wildcard to match the case-sensitive files containing file: find /-name * file*. Case insensitive: find /-iname * file*. If you match in this way, there will be more files, and the more accurate the matching is, the more convenient it is to find.
4. Find search directory-size file size. Let's look for files larger than 100MB, which should actually be 102400KB*2. All search commands are: find /-size + 204800. The-sign is less than, and writing the number directly is equal to zero.
5. Find search directory-user user name. Here is to find the file whose user name is user1. For how to add and delete a user name for linux, please refer to the Linux user management command: find /-user user1.
6. Find search directory-type d. Find all directories under a directory: find / tmp-type d.
7. Find search directory-cmin-time (in minutes). Look for files that have been modified within the next hour of etc. There are too many files under the root directory. Specify a directory: find / etc-cmin-60.
8. Of course, the find command can add a query with multiple options:-an is to meet the pre-and post-conditions, and-o is to meet a condition, so that we can clear and see the filtered files.
The above are all the contents of the method of realizing conditional query in linux. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.