Tag Info

Hot answers tagged

9

The line tar (child): xz: Cannot exec: No such file or directory gives you the real error. The xz programm cannot be executed, probably because it is not installed. To install the xz (de)compression tools, issue sudo apt-get install xz-utils


7

The tar command is one of the oldest commands in *nix. It was created long long ago to do tape archives where data was stored on tape drives. When the utility was written, the current standard of putting a dash to indicate a parameter was not yet invented. It is optional for tar, but mandatory for almost every other command.


4

Cygwin contains the necessary tools, of course. It's overkill just to unpack one tarball, but if you like the Linux command line tools, Cygwin is well worth installing.


3

You must be combining the -z and -j compression options. The first uses gzip the second uses bzip. The command tar xjvf will not give you that error.


3

You'll want to add the P (or -P) flag to your command line. From the manpage: -P Preserve pathnames. By default, absolute pathnames (those that begin with a / character have the leading slash removed both when creating archives and extracting from them. Also, tar will refuse to extract archive entries whose pathnames ...


3

I doubt that the different schemes would make a lot of difference to be honest since the compression algorithms typically only look forward a limited amount in order to control memory use. The exception is S3 which would end up larger most likely since compressing a compressed file adds overheads but cannot compress. If you want better compression, look ...


2

Looking at the error you are seeing coupled with the fact that you can indeed decompress it says that the file is a genuine TAR/Gzip archive, but perhaps not an immediate TAR is created after the Gzip. Meaning, if you downloaded this from a web server, sometimes Gzip compression get’s applied to web content on the server level to speed up content download. ...


2

First, make a backup of the 50GB to another computer such as your own computer or a different host. Second, explain your situation to the new web host. Ask them if you could have them temporarily mount you a special /tmp2 that will have at least 50GB (maybe 55GB). Then have them move your tar file to the /tmp2. Now, that your server has 100GB free, you can ...


2

Yes, using the compression flags in the tar command directly (eg, tar czf) will reduce intermediate disk usage as it does not create any temporary uncompressed tar file, but rather uses pipes to pass the stdout of tar directly to stdin of the compression utility. Depending on how pipes are implemented on your particular system, tar might appear to be ...


2

Try the following: find . -type f -printf "%h\n%f\n" | xargs -L 2 tar -rf /tmp/files.tar -C or some variation depending on your needs. One should consider security when executing this command. And if you're willing to have "./" before the filename, the following might be a little more secure: find -type f -execdir tar -rf /tmp/files.tar {} \; or ...


2

this answer might cover it Spaces in Linux environmental variables? You put the environment variable in double quotes. example demonstrating that below I am doing ls 'asdf asdf' which is ls on one file 'adsf asdf' with a space in the filename. I want to do it with a variable. You see with double quotes it gets the result. With no quotes it treats the space ...


2

Try using the -t flag to see how the filename is stored, then specify the same name at the end of your extraction tar command, including any path/directories. As in tar --extract --file=some.tar exactfilename


2

The problem is this part: xargs -I common printf "%s%s\n" common "*.log" The *.log is inserted in the template as is. I don't understand why you put the "*" there at all. This would fix that: xargs -I common printf "%s%s\n" common .log However, the last tar command won't actually work, because the tar cvzf hello.tgz fg command will be executed for each ...


2

You use the file command - which should tell you what it is. However, grabbing the file from that link downloads an error page, and I don't have an oracle login.


2

./ means the current directory. Your two listings are identical. Having ./ in front of the file when listing the archive helps to handle files with a special name. A file name -file will be displayed as ./-file allowing to be processed by a second tool.


2

This happens because you have like multiple tar.exe, and one of them might be provided by git on windows. In terms of fixing this problem, you might want to adjust the order of path. Try putting the path for the real tar at the beginning of the PATH env.


2

This is probably not relevant anymore, but I just had the same problem and found a simple solution that worked for me and thought it would be nice to share. I had a password protected RAR archive in 6 parts, but part4 was missing. I tried to use WinRAR's "repair" function but it said it couldn't find the recovery record. I tried the methods above but they ...


2

If you have tar and ssh, you can create a tarball and send it directly over ssh, by specifying - or /dev/stdout as the output file: ssh yourswitch "tar cvzf - /" > switch.tgz


1

Use 7Zip to open it then click Info button. It will show information about compression methods and so on. By far 7Zip isn't the only program which can do it (it's my choice because it's open source and free), a lot of archivers can do the same.


1

You are entering a "piped" command. Your interpreter (bash etc.) creates a pipe and executes two commands (spawns 2 processes - tar & gzip). In this procedure bash forks multiple times and it is undefined if your target file pavan.tar.gz is created before or after * expansion in tar command.


1

CentOS and RHEL are very conservative with their package releases - so this may actually be one of the newer packages if you are running an older RHEL (RHEL5 spans 2007 to 2013) you may ned to install a newer RHEL update (current is 5 update 10) and then try again. Failing this, you will need to grab the package files from http://ftp.gnu.org/gnu/tar/ to ...


1

You can break it down to unzip first then untar gunzip package.tar.gz tar xfv package.tar or do it in one command gunzip -c package.tar.gz | tar xfv - It maybe on the other Linux system the tar does not recogize gz files or needs the z flag.


1

You can gunzip and untar in one step without using pipe: tar xvfz package.tar.gz or depending on the tar version you have, you may need a dash - tar -xvfz package.tar.gz which is equivalent to gunzip -c package.tar.gz | tar xfv -


1

It can't do that, at least not as conveniently as you'd probably like. To understand why, you have to consider how such a program would work. In the decompression case, it can easily stat the original .tar.xz file to get its size, and the progress can be computed as the number of bytes that have passed through bar, divided by the file size. But in the ...


1

cat myfile.tgz | ssh user@host "tar xzf - -C /some/dir"


1

The first thing you need to do is extracting it in a folder, let's make it your desktop. You can extract an archive right clicking on it and choosing the appropriate entry. It should create a new folder with a similar name, e.g. program-1.2.3. Now you need to open your terminal and then go to that directory: cd ...


1

Try this: ~/src$ git clone git@github.com:breach/mod_strip.git ~/src$ cd mod_strip ~/src$ npm install


1

Directly answering the specific questions you posed: Is there a performance penalty during the aggregation/compression/decompression stages for using tar encapsulated in gzip or bzip2, when compared to using a file format that does aggregation and compression in the same data structure? Assume the runtime of the compressor being compared is ...


1

I did my own benchmark on 1.1GB Linux installation vmdk image: rar =260MB comp= 85s decomp= 5s 7z(p7z)=269MB comp= 98s decomp=15s tar.xz =288MB comp=400s decomp=30s tar.bz2=382MB comp= 91s decomp=70s tar.gz =421MB comp=181s decomp= 5s all compression levels on max, CPU Intel I7 3740QM, Memory 32GB 1600, source and destination on RAM ...


1

I've posted my answer here: http://stackoverflow.com/questions/13924856/unix-tar-do-not-preserve-directory-structure repost (for lazy ppl) This is ugly... but it works... I had this same problem but with multiple folders, I just wanted to flat every files out. You can use the option "transform" to pass a sed expression and... it works as expected. ...



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