tar a date range
I'm trying to figure out how to tar a set of log files based on date range, but so far I'm getting frustrated by not finding the correct date combination. I've tryed:
'tar cvNf testarchive --newer=200511010001 [file names]' Any help on how badly I've messed up the line? |
i would use
ls then pipe | it through grep if you need to fine tune it, then pipe | it through tar |
find is the tool to get your file list, Checkout the -newer and -mtime options.
|
Got it working!
Thanks for the help. Here's the line I ended up with:
tar cfvz filename.tgz `find ./200* -ctime +60 ! -ctime +90` The log files are from a Checkpoint firewall. I only want them left there for 60 days and then I pull them off to a server with a CD burner. All the names begin with yyyy, hence the 200*. Now If I can just virtualize the filename and automate the FTP..... Thanks again |
All times are GMT -5. The time now is 06:57 PM. |