Tag Info

Hot answers tagged

7

This is what wildcards and brace expansion are for. See if echo file.bz2.part-* returns the filenames in the desired order, and use cat file.bz2.part-* > file.bz2 if it does. Otherwise, figure out some other more complex expansion that does.


6

tar can't do that, but you can achieve what you want with: find dir1 -depth -print0 | xargs -0 tar --create --no-recursion --remove-file --file - | bzip2 > dir1.tar.bz2 where: find dir1 -depth -print0 lists all files and directories in dir1, listing the directory contents before the directory itself (-depth). The use of -print0 (and -0 in xargs ...


5

When I mean "without having to extract it first", I mean not having to extract the entire archive to my hard drive and then convert it to ISO. The bad news: you will have to extract it. The good news: you don't have to extract it to your hard drive, you can do it all by piping to stdin, so it all happens in memory (which is basically what ...


5

Your tarball is uncompressed. The extension .bz is obsolete and misleading. You can decompress using the following command: tar xvf data_or.tar.bz What probably happened here is that data_or.tar.bz was created with the --auto-compress switch (or tar -cavf) that chooses the compression algorithm from the supplied extension. The proper extension for ...


4

split creates its partial file names in ascending lexicographical order. Since wildcard expansions lists the files in lexicographical order, cat file.bz2part-* > file.bz2 will concatenate the parts in the right order.


2

Update: My original answer doesn't work at all, sorry. tar won't accept a data stream from STDIN as input, so the first command fails. The only way I can think of to accomplish what you want is to write your own program to add the required tar headers and such around your data stream. Then you could write: $ bzcat foo.bz2 | stream-to-tar | bzip - > ...


2

No! They are packaged inside a bz2 file therefore part of the conversion process would be to extract.


1

What does file tell you? It may have been uncompressed why you downloaded it. If so, it's just not compressed at all.


1

Your pipe doesn't work because tar isn't extracting the files to stdout, it's just listing them. bzip2 therefore tries to decompress the list of filenames as plain text, which of course, is not a compressed file's contents (i.e., it's using the plain text as the contents of the file to be extracted). In order to use the output from tar xvf as a list of ...



Only top voted, non community-wiki answers of a minimum length are eligible