I need to write a program that removes only those files in a directory that are 2 hours or older.
Using something like this:
find . -mtime +0 -name '[A-Z]*'
This code snippet will return all files older than 1 day.
I have not found any reference finding a file that is n hours old.
Any help will be highly appreciated.
Thanks in advance for your help.
Using something like this:
find . -mtime +0 -name '[A-Z]*'
This code snippet will return all files older than 1 day.
I have not found any reference finding a file that is n hours old.
Any help will be highly appreciated.
Thanks in advance for your help.