Tar files in a dir modified before 7 days in a shell script
How could I tar the files (*.csv files) in a directory which are 7 days old?
I need to do this for archiving purposes.
Can you please help out?
Edited addition: If you want to use the above to tar them up you could use something like this:
This is exactly what I wanted
But in 'tar cfz ', the z seems to be an invalid option!
tar: z: unknown option
But I can always compress this file again, so that would not be a problem
Is it possible to use tar to extract a list of files stored in a file or stdinput?
I 've got a dir with lots of tar files.. and want to choose some with grep.
Hi again and sorry for answering my own question... i 've found a solution this morning...
Since i didn't get it with tar -T i searched a little around and tried xargs
ls |grep "tar.gz" |xargs -n1 tar -xzf
and my problem was gone :)
I love the pipe!
|All times are GMT -5. The time now is 01:41 AM.|