nnani
1
Hello All,
I have a directory containing of many .dat file, but with different naming conventions.
I want to delete files which are created before and on 10th September 2013.
I tried this command to see files which are are the files created before 10th September
find path/to/file -type f -mtime +5 -print
But this is giving me no result.
Any help on this appreciated.
find /path/to/file -type f -name "*dat" -mtime +5 -print
nnani
3
Hello this is not giving any result as the previous one
I didn't really look at the math, but for 10-Sep-2013, don't you think it should be -mtime +1
(considering today is 11-Sep-2013)
nnani
5
this worked but its giving wrong results.
can we find the files created on specific dates
What exactly do you mean by wrong results?
Hi,
If your find supported this options, you can try:
find /path/to/file -type f -name '*.dat' -not -newermt "Sep 10" -print
Regards.