Used in UNIX

xiaoxiao2021-03-06  28

The Find command is one of the strongest commands.

Its main usage:

# Find / -Print | WC -L Displays the number of all files and directories in the system.

# Find / -user $ logname -print Displays all files and directories in the system.

# Find / -size 100 -Print Display File size is 100 blocks.

# Find / -size -100 -print Displays the file size less than 100 blocks.

#find / -size 100 -print display file size is greater than 100 blocks.

# Find / -name core -exec rm {} /; look up and delete the core file.

# Find. -exec chown $ logname {} /; modify the user belonging to all files in a directory.

# Find.-type d -exec chmod 770 {} /; modify all directories in a directory.

转载请注明原文地址:https://www.9cbs.com/read-64196.html

New Post(0)