Find command notes

The find command is used to find files in a specified directory. Any string preceding the parameter will be treated as the directory name to look for. If you use this command without setting any parameters, the find command will search for subdirectories and files in the current directory. And all the found subdirectories and files will be displayed.


 

 

: Specify a string as the template style for finding directories; -perm<permission value>: Find files or directories that match the specified permission value; -print: Assuming the return value of the find command is True, list the file or directory name to standard output. The format is one name per column, and each name is preceded by a "./" string; -print0: Assuming the return value of the find command is True, list the file or directory name to the standard output. The format is that all names are on the same line; -printf <output format>: Assuming the return value of the find command is True, list the file or directory name to the standard output. The format can be specified by yourself; -prune: do not look for strings as a template style for finding files or directories; -regex<template style>: specify a string as a template style for finding files or directories; -size<file size>: search for files or directories that match the specified format -true: set the return values ​​of the find command to True; -typ<file type>: only find files that match the specified file type; -uid<user ID>: find files that match the specified file type The file or directory of the user ID; -used<number of days>: find the file or directory that has been accessed at the specified time after the file or directory is changed, the unit is calculated in days; -user<owner name>: search character and The file or directory with the specified owner name; -version or --version: display version information; -xdev: limit the scope to the preceding file system; -xtype <file type>: the effect of this parameter is the same as the specified "-type" " parameter is similar, the difference is that it checks for symlinks. : Assuming the return value of the find command is True, list the file or directory name to standard output. The format can be specified by yourself; -prune: do not look for strings as a template style for finding files or directories; -regex<template style>: specify a string as a template style for finding files or directories; -size<file size>: search for files or directories that match the specified format -true: set the return values ​​of the find command to True; -typ<file type>: only find files that match the specified file type; -uid<user ID>: find files that match the specified file type The file or directory of the user ID; -used<number of days>: find the file or directory that has been accessed at the specified time after the file or directory is changed, the unit is calculated in days; -user<owner name>: search character and The file or directory with the specified owner name; -version or --version: display version information; -xdev: limit the scope to the preceding file system; -xtype <file type>: the effect of this parameter is the same as the specified "-type" " parameter is similar, the difference is that it checks for symlinks. : Assuming the return value of the find command is True, list the file or directory name to standard output. The format can be specified by yourself; -prune: do not look for strings as a template style for finding files or directories; -regex<template style>: specify a string as a template style for finding files or directories; -size<file size>: search for files or directories that match the specified format -true: set the return values ​​of the find command to True; -typ<file type>: only find files that match the specified file type; -uid<user ID>: find files that match the specified file type The file or directory of the user ID; -used<number of days>: find the file or directory that has been accessed at the specified time after the file or directory is changed, the unit is calculated in days; -user<owner name>: search character and The file or directory with the specified owner name; -version or --version: display version information; -xdev: limit the scope to the preceding file system; -xtype <file type>: the effect of this parameter is the same as the specified "-type" " parameter is similar, the difference is that it checks for symlinks.

 

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327005637&siteId=291194637