How can we list all files of a directory created before a particular day in Unix?
Asked
Active
Viewed 32 times
-1
-
1Hi Arman welcome to SO, your question should show us the research efforts, and if any, the code you tried. – J. Chomel May 18 '16 at 09:42
-
try this http://superuser.com/questions/560598/how-list-file-by-range-of-date – JYoThI May 18 '16 at 10:16
1 Answers
0
If this may help, after you calculate the number of days between this particular day and today (It's not easy to do, but this could be of help), then you can use find -ctime -n
where n
is the number of days since the files where created.
find <your-directory> -ctime -5