Bash - Find and delete files older than two days
List files:
find /var/www/html/root/Files/test_rm/*.pdf -mtime +1 -exec ls {} \;
Remove files:
find /var/www/html/root/Files/test_rm/*.pdf -mtime +1 -exec rm {} \;
List files:
find /var/www/html/root/Files/test_rm/*.pdf -mtime +1 -exec ls {} \;
Remove files:
find /var/www/html/root/Files/test_rm/*.pdf -mtime +1 -exec rm {} \;
Comments