문제

I was supposed to remove the archive files that are at least 7days older or the files will be retain to the directory for about 7 days only. How can I execute it using shell script?

Thanks.

올바른 솔루션이 없습니다

다른 팁

Using find

find /path/to/dir -mtime +7 -type f -exec rm {} \;

I think everyday (use cron) you'll check which files are older than 7 days

check http://ubuntuforums.org/showthread.php?t=2006006

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top