Results 1 to 3 of 3
I have a directory containg lots of sub-directories which are numbers sequentially. I am trying to tar up a selection of them, for instance folders 1002 to 10053.
How would ...
- 09-03-2007 #1
Tar a range of files
I have a directory containg lots of sub-directories which are numbers sequentially. I am trying to tar up a selection of them, for instance folders 1002 to 10053.
How would I tar up files between to ranges?
- 09-03-2007 #2Linux User
- Join Date
- Jan 2007
- Location
- cleveland
- Posts
- 452
one way is to put the names of what you want included
into a file F, and then use tar's "-T, --files-from F
get names to extract or archive from file F" option;
and as the names are sequential, you can use seq:
seq 1002 10053>F; tar -T F cf new.tar
you might try it with a small F at first
the sun is new every day (heraclitus)
- 09-03-2007 #3
Had to edit you version a bit to:
seq 1000 1050 >F; tar cf newfile.tar -T F; rm F
but thanks for pointing me in the right direction


Reply With Quote