New answers tagged

0

Combining the previous answers and comments: To simply extract the contents and create target directory if it is missing: mkdir -p /target/directory && tar xf archive.tar -C /target/directory To extract and also remove the root(first level) directory in the zip mkdir -p /target/directory && tar xf archive.tar -C /target/directory --strip-...


1

tar: Child returned status 2 Simple : You got a corrupt package. Please delete, and download a new one: http://ufpr.dl.sourceforge.net/project/marathon/Aleph%20One/2015-06-19/AlephOne-20150619.tar.bz2 About tar : From /usr/doc/tar-1.15.1/NEWS , slackware 10.2 , tar version 1.15 - Sergey Poznyakoff, 2004-12-20 Compressed archives are ...


0

As far as my experiments go (and somehow as I expected): the source file is removed only if the command completes normally however, "-u" doesn't remove the previous version of the file, it merely adds it to the end, so repeated updates with the same file will make the TAR file grow indefinitely.


2

Something like for f in {00001..00270}.tar; do tar xf "$f" --strip-components=1 done should untar them all into directory 001 (i.e. stripping the leading path components 00001/, 00002/ etc). If you want to untar them to a completely different location, you can use the -C option and (optionally) strip both original path components for f in {00001.....


0

I would suggest that you use: tar cf - foldername | 7z a -si -m0=lzma2 -mx=3 foldername.tar.7z for dramatic speedup increase. It has the advantage of using lzma2 (-m0=lzma2) (which utilizes max available cores on your system and "Fast compression" preset (-mx=3), which is basically fast and good enough. Note that LZMA2 is not only utilizing all cores on ...



Top 50 recent answers are included