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--
For example, if we know that a Linux file is 1500 bytes in size, we can query it with the following command
Find /-size 1500c, the character c indicates that the size of the file to be looked up is in bytes.
If we don't even know the exact size of this file, we can also use fuzzy lookup mode in Linux to solve the problem.
For example, if we enter the command find/-size + 10000000c, it indicates that our designated system finds files larger than 10000000 bytes in the root directory and displays them. The "+" in the command requires the system to list only files larger than the specified size, while the use of "-" means that the system is required to list files that are smaller than the specified size. The following list is the search action to be made by the system after Linux uses different "find" commands, from which we can easily see that there are many modes of using the "find" command in Linux. As long as the "find" command is used flexibly, there is no need to look up poor abilities in WINDOWS.
Find /-amin-10 # check the files accessed in the last 10 minutes of the system
Find /-atime-2 # check the files accessed in the last 48 hours of the system
Find /-empty # check for empty files or binders in the system
Find /-groupcat # check the files that belong to groupcat in the system
Find /-mmin-5 # check the files that have been modified in the last 5 minutes of the system
Find /-mtime-1 # check the files modified in the last 24 hours of the system
Find /-nouser # check the files that belong to invalid users in the system
Find /-user fred # check the files that belong to the user FRED in the system
Find /-name aaa # look up the file named aaa in the system
The following list is some of the conditions for looking up the characteristics of a file that can be specified by the find command. Not all the search conditions are listed here. Refer to the relevant books on Linux to know the search functions of all find commands.
-amin n check the files accessed in the last N minutes of the system
-atime n to check the files accessed by the last 24 hours in the system
-cmin n to check the files in the system that were changed in the last N minutes.
-ctime n to check the files in the system that were changed in the last 24 hours.
-empty checks the system for blank files, or blank file directories, or binders with no subdirectories in the directory
-false looks up files in the system that are always wrong
-fstype type looks for files in the system that exist in the specified file system, such as ext2.
-gid n look up files in the system whose numeric group ID is n
-group gname checks the files in the system that belong to the gnam filegroup, and specifies the files of the group and ID
The control options for the Find command are described:
The Find command also provides users with some unique options to control the lookup operation. The following table summarizes the control options and usage of the most basic and commonly used find commands.
Usage description
-daystart test system files within 24 hours from today, the usage is similar to-amin
-depth uses the depth-level search process mode to give priority to the contents of files in a specified directory at a certain level.
-follow follows wildcard link mode lookup; in addition, wildcard link mode query can also be ignored
-help displays a summary of commands
-maxdepth levels is checked in a directory at a certain level according to the decreasing method.
-mount is not looked up in the file system directory, and the usage is similar to-xdev.
-noleaf prohibits optimization search in non-UNUX file systems, MS-DOS systems, and CD-ROM file systems
-version print version number
For the oracle video tutorial, please follow: http://u.youku.com/user_video/id_UMzAzMjkxMjE2.html
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.