Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to tar by date

Status
Not open for further replies.

jewel464g

Technical User
Jul 18, 2001
198
US
I need to tar up some files in a directory that are older than 3/30/2003.

Thanks,
Jewel When faced with a decision, always ask, 'Which would be the most fun?'
 
Hi,

From tar man page, I dont think so you can tar older than date. The only option is tar newer than date.

regards,
feroz
 
You could write a perl script to parse through the files to find dates older 3/31/03 and dump them into a tarfile.f. Then simply use tar specifying the tarfile.f as the files to include. Use a variable in the script for the date so it can be reused or use command line options to run it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top