Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use tar to quickly create segmented files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use tar to quickly create segmented files
Authored by: mzs on Mar 24, '09 07:54:24AM

That is why you pipe cpio or tar into split, optionally first piping it into gzip or bzip2.

tar cf - foo | bzip2 -c --best - | split -b 1440k - foo.tar.bz2



[ Reply to This | # ]
Use tar to quickly create segmented files
Authored by: TonyT on Mar 24, '09 10:04:46AM

I really don't understand how piping 3 programs with:
tar cf - foo | bzip2 -c --best - | split -b 1440k - foo.tar.bz2
is preferable to:
tar -L 1440 -cMj --file=foo.tar-{1..99} foo



[ Reply to This | # ]
Use tar to quickly create segmented files
Authored by: mzs on Mar 24, '09 10:40:29AM

Like I said it's not portable. -j and -L are not in all tar programs. In fact -L is most likely something about symlinks in bsdtar considering how the other commands there work. It's best to train your fingers and write your scripts so that you do not have to download and build lots of GNU versions of stuff before you can use a new computer or one someone else admins.



[ Reply to This | # ]