1.find find files that match your search criteria
Find Pathname-options [-print-exec-ok ...]
--options:
-perm: File lookup permission, plus number
-type: File type, plus f: File D: Directory L: Symbolic link file
-group: Find files belonging to group specified user groups
-exec: followed by command commands
command terminates with a semicolon ";" To be sure that there must be a '; ' in the back
{}, using {} to represent the file name, that is, the files that were filtered out in the previous process of find, are used for command commands, but may have different meanings for different systems using semicolons directly, using the "\ ' character of the transfer" to specify it before the semicolon.
-OK: followed by command commands, unlike-exec, each command requires the user to confirm whether or not to execute.
Example: (1). list files with root characters in the file name
Find/-type F-name "*root*"-exec ls-l {} \;
The 2.tr filter tr is used to convert characters from standard input.
TR [OPTION] ... SET1 [SET2]
1 ', converts all lowercase characters in passwd to lowercase characters
tr [A-z] [a-z] </etc/passwd
--options
-S: Removes all characters that are duplicated with SET1, leaving only the first one.
2 ', remove the duplicate E
Tr-s ' E ' <test4.txt
Tr-s ' e ' F ' <test4.txt convert E to F and remove the duplicate F
-D: Delete SET1-like characters
3 ', remove the ': ' in passwd
Tr-d ': '/etc/passwd
3.
Shell character (string) processing command