![]() |
File Dates
What would the best way to be to get the file dates of files in the current directory through script? I want to archive all files older then say 30 days, and im not sure the best way to do it. any suggestions?
|
There are many way
Code:
find $PWD -mtime 30 |
yeah i had ideas like that, but how do i get at each file, to move it say into my backup directory?
|
could i use find and tar in conjuction say to archive all files 30 days or older?
something like tar cv find -mtime 30 or something similar? |
Try: tar cfv archive.tar `find -mtime 30`
|
update the time with 'touch' see time with 'ls -l'
|
| All times are GMT -5. The time now is 05:14 PM. |