|
find ./ -type f -mtime +7 -exec rm -f {} \;
Warning, as coded, this will remove ALL files in the current directory and all subdirectories that were not either created or modified in the last 7 days.
Other coding will be necessary to restrict to only current directory.
|