Bulk delete files in a specified directory
Deletes all files at the end of the. Log in the current directory
Find. -name "*.log"-exec rm-rf {} \;
Note:
There is a space between 1.{} and \
2.find. There are also spaces between the-name
3.exec is a subsequent command, {} content represents the previously found file
Delete files in the current directory that were modified 1 days ago
Find. -mtime +1-name "*"-exec rm-rf {} \;
Delete files in the current directory that were modified 60 minutes ago
Find. -mmin +60-name "*"-exec rm-rf {} \; File Content Lookup
Find all files in the current directory that are of type file, with a filename suffix of class
Find. -type F-name *class
Note: type parameter-f means file-D refers to directory
Find the file name for all files in the current directory containing the ABCD string
Find./-type f-exec grep-il abcd {} \;
Note: the-I value ignores the keyword case; -L only lists matching filenames