Touch myfile create a file
Chmod U + W myfile: grant the execution permission to the owner
Chmod U + x myfile
Chmod u-r myfile
Chmod g + x myfile adds execution permissions to users in the same group.
Chmod o + x myfile adds execution permissions to other users
Chmod U + S myfile: Set SUID for myfile
ID to check which group you belong
Ln-S/usr/SGY/usr/lessonshell/SGY create a link to/usr/SGY in the/usr/lessonshell/SGY directory, the premise is that/usr/lessonshell/SGY must exist.
Find.-Name "*. c" print to check all *. c files in the current directory and subdirectory
Find SGY-name "*. c" print to check all the *. c files in the SGY directory and subdirectory.
Find/-name "*. c" print to check all *. c files in the root directory and subdirectory.
Find/usr/SGY-User Root-print check/usr/SGY directory and all files in the subdirectory are root files.
Find.-Group root-print: Check all files whose user groups are root in the current directory and subdirectory.
Find/usr/SGY-nouser-print check/usr/SGY directory and subdirectory all files with no owner
Find/usr/SGY-nogroup-print check/usr/SGY directory and subdirectory all files without Group
Find.-mtime-5-print: Check all files in the current directory and subdirectory that have been changed within five days.
Find.-mtime + 5-print: Check the current directory and sub-directory for all files whose change time is five days ago.
Find.-newer pipeline. C! -Newer echoserver. c print
Check all files in the current directory and subdirectory that are newer than pipeline. C but earlier than echoserver. C.
Find.-type D-print: Query all directories in the current directory and subdirectory
Find. Size + 1000c-print query all files larger than 1 K in the current directory and subdirectory
Find. Size + 1000c-exec LS-l {}/; check all the files larger than 1 K in the current directory and subdirectory and list them with LS. Be sure not to drop commas.
Find. Name "*. c"-exec LS-l {}/; check all. c files in the current directory and sub-directories and list them with LS. Be sure not to drop commas.
Find. Name "*. c" | xargs LS-l query all. c files in the current directory and sub-directories, and list them with LS (note the use of xargs, which is recommended)
Find. Name "*. log"-mtimes + 5-exec RM {}/; check the current directory and subdirectory for all log files 5 days ago, and delete the files (no prompt, use it with caution)
Find. Name "*. log"-mtimes + 5-OK RM {}/; check the current directory and subdirectory for all log files 5 days ago, and delete the files (with a prompt)
Find. Name "*. c" | xargs grep "fork" query all the *. c files in the current directory and subdirectory that contain fork.
Find. Name "*. c" | xargs LS-l query all. c files in the current directory and subdirectory, and use ls to list them.