I want to delete files in a folder that have creation time older than 1 day. How can I get those files?
Regards
I want to delete files in a folder that have creation time older than 1 day. How can I get those files?
Regards
Unix does not have creation time. You can try:
find /path/to/dir -type f -mtime +1 -exec rm {} \;
This will delete all files which were last modified more than 1 day ago.
If you want to look for files that have not been accessed in the last day, use the -atime
argument instead.