find -atime +3 -name targz
This command will find all files in the current directory and its subdirectories that have not been accessed in the last 3 days and have the extension ".tar.gz".
Explanation:
- "find" command is used to search for files and directories in a specified location.
- "-atime +3" option is used to search for files that have not been accessed in the last 3 days. "+3" means more than 3 days.
- "-name" option is used to specify the name of the file to search for.
- ".tar.gz" is the name of the file to search for, with the extension ".tar.gz". The dot before the file name means that it is a hidden file
原文地址: https://www.cveoy.top/t/topic/e99i 著作权归作者所有。请勿转载和采集!