Statement writing: Find corresponding directory-mtime + days-name "filename"-exec rm-rf {} \;
Example 1: The/usr/local/backups directory is all 10 days ago with "." The file deletion
Find/usr/local/backups-mtime +10-name "*.*"-exec rm-rf {} \;
Find:linux Lookup command, the user finds the file for the specified condition
/usr/local/backups: Any directory that you want to clean
-mtime: The standard sentence formulation
+10: Find 10 days before the file, where the number of days to represent, +30 to find 30 days before the file
"*.*": the type of data you want to find, "*.jpg" means to find all the files with the extension jpg, "*" means to find all the files, this is flexible to use, extrapolate
-exec: Fixed wording
RM-RF: Force delete files, including directories
{} \; : fixed wording, a pair of curly braces + space +\
Find $1-name "*.html"-mtime +1-print0 |xargs-0 rm-v
Above this Linux a Find command with RM delete a day before the file method is small series to share all the content, hope to give you a reference, also hope that we support cloud habitat community.