Answers:
find /the/dir/to/start/in -type f -mtime +365 -ls -exec rm -f -- {} \;
find /path/to/files -type f -mtime +365 -delete会更容易。
find … -exec rm -f {} +速度会更快一点(除了古老的系统,它是可移植的)。
--第一个文件名以“。”开头-(尽管您可以保证如果传递给的目录find不是以“ -。” 开头)。
man find。繁荣。