tar
Does anybody know how to archive files before a certain date with tar.
I know there is this function --newer. Thank you very much guys in advance. Koda0505 |
You can generate the filelist with find and use it's output for tar.
man find e.g. the command find /dir/to/backup -ctime -1 -type f gives all the files which were last changed 1 days and before (the minus sign). so, if you want to tar these files simply extend this with tar: tar czvf backup.tar.gz `find /dir/to/backup -ctime -1 -type f` and so on. This is the unix philosophy. Small programs do what they need to do and you can pipe them together :-) I hope it will solve your problem. |
You could also write a shell script.
|
Thanks bbk, I'll try that.
Koda0505 |
All times are GMT -5. The time now is 05:50 AM. |