how to find files which is modifed 01 year before
how to find files which is modifed 01 year before, with size detail
|
Files modified 365 days ago:
find . -type f -mtime 365 -exec ls -l {} \; Files modified 365 days or more ago: find . -type f -mtime +365 -exec ls -l {} \; Files modified 365 days or less ago: find . -type f -mtime -365 -exec ls -l {} \; For other options: man find ;-) |
Hi,
find /full/path/to/startpoint -mtime +365 -ls This shows files that are modified a year (and older) ago. If you need files that are between 1 and 2 years old: find /full/path/to/startpoint -mtime +365 -mtime -730 -ls +NUMBER means older then NUMBER, -NUMBER means younger then NUMBER. /full/path/to/styartpoint can be changed to a dot (.) if you execute the find command from the correct directory. Hope this helps. |
Code:
find . -type f -mtime 365 |xargs ls -l or Code:
find . -type f -mtime 365 |xargs ls -sh |
All times are GMT -5. The time now is 03:16 AM. |