Locate non-real lookup, lookup is based on the system-wide file database,
#updatedb, build the database manually, locate Find Fast
Find: Real-time precision, support for many search criteria, traverse all files in a given directory, slow
Find Find path Lookup standard find standard find later processing operation
Find the path: Default view current directory
Find standard: Default to all files under the specified road strength
Processing operation: Default is Display
Matching Criteria:
-maxdepth level maximum Search directory depth, specified directory 1th
-mindepth level maximum Search directory depth
-name filename exactly matches the file name, supporting file name wildcard
-iname Case insensitive
-refex PATTERN for file name matching based on regular expressions
-user username based on owner lookup
-group GroupName
-uid
-gid
-nouser to find users who are not owned by the master
-nogroup
-type
F: Normal file
D
C
-size #k #M Search by file size
+10k greater than 10K 10k means 9 to 10K
Combination Condition:-A
-O
-not
-atime +5 five days ago
-ctime-5 within five days
-mtime 5 just five days from now.
-mmin
-cmin
-amin
-perm mode exact Match
/mode or relationship (any permission has a match on the line)
-mode matches only if they contain permissions
Find-name "*.conf"-exec cp {} {}.orig \;
Backup configuration file, Add. orig
Operation:
-print Display
-ls similar to Ls-l
-exec chmod o-w {} \; #花括号引用匹配到的文件
\; The Terminator must be in this format
Compress file compression with the suffix name. Z
-D Decompression
-c result output to standard output, so you can punch
gzip file suffix named GZ
-D
-C
Zcat file.gz View gzip Compressed files
The bzip2 file suffix is named bz2
-K Keep the original file
Bzcat View bzip2 File
XZ file suffix named XZ
-K
Xzcat
TAR-CVF-C: Creating a Package
-F: Packaged file name
-Z Zip: Post-packaged compression
-j XZ
-j bzip2
-X: Unpack the Package
-r: Append files to the packaged
Compression decompression basically similar, decompression is-D, retain the original file using-k,tar support Direct XF decompression, Linux can automatically identify the decompression format, mainly about a compressed format suffix name,
Linux file Lookup and compression