#to file files older than 10 days:
#now append it with -exec switch + rm {} loop to delete all found files:
----------------------
#and to find only in specific directory ignore sub directories
find /home/folder/ -mtime +10;
#now append it with -exec switch + rm {} loop to delete all found files:
find /home/folder/ -mtime +10 -exec rm {} \;
----------------------
#and to find only in specific directory ignore sub directories
find /home/folder/ -maxdepth 1 -mtime +10
No comments:
Post a Comment