An archive file format (and the program that reads it) commonly used on Unix and Linux.

learn more… | top users | synonyms

76
votes
5answers
86k views

How to specify level of compression when using tar -zcvf?

I gzip directories very often at work. What I normally do is tar -zcvf file.tar.gz /path/to/directory Is there a way to specify the compression level here? I want to use the best compression ...
5
votes
5answers
12k views

How to extract multipart rar with missing parts?

I have a multipart .rar archive containing a single .tar.gz file inside it (don't ask why, that is just how it was made). I am missing a few of the parts, but do have the first part. I would like to ...
2
votes
1answer
41 views

List contents of tarball in tree format

Per the answers here I'm able to list the contents of my tarball in ls format. However, I'd like to be able to list them in tree format, i.e. something like the latter instead of the former: With tar:...
1
vote
0answers
28 views

tar stops with “Cannot stat: No such file or directory”

tar complains about not finding a directory that exists, and to which I have permissions. I have seen a number of similar questions, but all of them had to do wih the option f not being just before ...
2
votes
2answers
3k views

Create a tarball with a fake `root`

I'm working on something in a Makefile that will look something like this: tarball: mkdir -p tmp/tarball/etc/service mkdir -p tmp/tarball/usr/local mkdir -p tmp/tarball/opt/...
0
votes
1answer
1k views

extracting all files in tar to a remote server

The command below extracts the specified file in a remote machine: tar -xzOf file.tar.gz file_you_want_to_extract | ssh user@host 'cat > /path/to/destination_file' My requirement is that I want ...
2
votes
2answers
5k views

How to tar a directory preserving not only permissions, but ownership too

I have to compress a directory using tar.gz preserving not only permissions, but ownership/groups too. And, in this directory there are many files that belong to many users.
39
votes
5answers
10k views

gzip without tar? Why are they used together?

Why are tar and gzip almost always used together, and not just gzip? Is there any advantage to that method?
16
votes
7answers
17k views

.tar files without directory structure

I'm .taring some files with the path example/super_user/Output.*. The resulting .tar looks like this: + example + super_user - Output.zip - Output.xml - Output.txt ...
0
votes
1answer
26 views

Tar & save the output of a command

I want to tar the output of a command, say cat hello.world, to a compressed tar file. I don’t want to save a temporary file and later tar it manually. How can I do this?
0
votes
1answer
278 views

linux tar command -t option to show max-depth=1

A tar.gz file may contain many files and folders, and the folders may, in turn, have a lot of files and folders. I want to list the contents of the tar.gz file, but only one directory deep. How can ...
0
votes
1answer
49 views

How to install XDM on Linux Ubuntu

I'm trying to install the latest version of xdm on Ubuntu 16.04 LTS from the official website http://xdman.sourceforge.net/ .. I managed to extract it, but i couldn't insall it! .. Any help? here's ...
0
votes
0answers
28 views

What version of tar does 7-zip use?

Does anyone know what version of tar 7zip uses for archiving/extracting? Is it gnu tar or bsd tar... or something else? I've googled around for an answer but can't find anything.
59
votes
9answers
22k views

Linux / OS X tar incompatibility – tarballs created on OS X give errors when untarred in Linux

When I tar up files on my Macbook and untar them in Linux, I repeatedly get the following warnings/errors: tar: Ignoring unknown extended header keyword `SCHILY.ino' tar: Ignoring unknown extended ...
2
votes
2answers
990 views

Remote backup via SSH

I have two computers, my local and remote. I want to backup remote server with tar command via ssh but saving tar file on local computer. Is it possible?
54
votes
1answer
98k views

How do I unzip a tar gz archive to a specific destination?

I want to unpack a .tar.gz file to a specific directory. The archive file is in /root/Documents. I want to unzip it into /root/Desktop/folder. The folder structure in zipped file should be preserved ...
17
votes
3answers
14k views

Forcing “tar” to create an empty archive

I am making an RPM in which everything is contained in the .spec file (don't ask :-). rpmbuild requires a "Source" file, so I was trying to create an empty tar file. However, if I don't give any ...
189
votes
18answers
24k views

What is the advantage of using 'tar' today?

I know that tar was made for tape archives back in the day, but today we have archive file formats that both aggregate files and perform compression within the same logical file format. Questions: ...
1
vote
2answers
30 views

How to download a .gz and use it as a command?

I recently had the need to install a command to limit cpu recources to a task. (If you're interested, the source is here: http://www.willnolan.com/cputhrottle/cputhrottle.html) This task has always ...
0
votes
1answer
43 views

Why do tar.gz files download faster than .zip files?

I have a Linux build server that I frequently download from and I have noticed that the .tar.gz files have download speeds approximately 3 times faster than .zip files. However, to my understanding ...
0
votes
0answers
11 views

extract only filest that differ (tar)

I want to extract the tar archive containing codebase of some project over already existing project (older version) without changing timestamp of the files that are the same. I'm using Debian and I ...
1
vote
0answers
21 views

How to convert a file format from tar.gz to tar.bz2 using the windows console?

I have some python packages in tar.gz format that I need to convert to tar.bz2. Is there a way to do that in the windows console? thanks!
6
votes
3answers
5k views

tar: --exclude=“.git”: Cannot stat: No such file or directory

This is driving me crazy. I want to tar a directory, but exclude some files. This is my command: tar -zcvf $NAME-$VERSION.tar.gz $NAME-$VERSION --exclude='.git' --exclude='.gitignore' While the ...
1
vote
1answer
12 views

Use pipe viewer when streaming directory through tar

I am currently streaming a directory over SSH after compressing it through tar: tar cz /path/to/foo | pv | ssh HOSTNAME 'tar xmz && some-cool-command' The issue is that pv doesn't know the ...
0
votes
1answer
57 views

Bash loop for adding --exclude list to tar

I have a bash script I made to encrypt/decrypt using GPG and tar. Right now I have my --exclude hard coded into the script, but I'd like to make it a bit more dynamic and add the items to exclude as ...
0
votes
1answer
12 views

Does .tar files have checksum that covers the bulk data contents?

I have experienced that a .tar file was corrupted, without receiving an error when unpacking the file, so that makes me wonder: Does .tar files have checksum that covers the bulk data contents?
0
votes
1answer
28 views

Tar Archive All Files with Extension

I'm using this command to archive all PHP files: find -name "*.php" | sudo tar -zcpvf my-archive.tar.gz -T - It works great, except that the output is like this: ./file1.php ./file2.php ./file3....
0
votes
1answer
31 views

TAR and compress a directory but skip compression on already compressed files

I want to TAR and compress a user's home directory as efficiently as possible. The problem is there are a lot of large and already compressed (gzip/bzip2) and hard-to compress files (binaries/data) in ...
0
votes
2answers
41 views

Find files in a folder, compress them to a target location without directory structure in Linux terminal

In Linux terminal: I'm in a folder say /home/user/origlocation/ I need to goto a folder let's say ../source/ and find all files with the name test*.txt. Then I need to compress (tar.gz) these files to ...
0
votes
0answers
6 views

Extract from tar between two dates

What would be the most efficient way to extract all those files from a large tar archive having a modification time between two given dates? I think tar -t could be used somehow to filter the files, ...
0
votes
0answers
75 views

Installing tar.gz file with command line on OS X

I want to install aria2 on OS X 10.11.3 I've downloaded tar.gz file from here. unzipped file with double click. opened command line (i have Xcode command line tools installed). cd /path/to/aria/...
1
vote
2answers
761 views

Split an[d] archive large backup file in constant working space

I'm currently attempting to use tar and split to get DVD-sized archives of my Time Machine backup database. It's going to work this time, as I have a partition on my external drive large enough to ...
6
votes
2answers
2k views

How to split a tar file into smaller parts at file boundaries?

I have a tar file that I want to split into multiple smaller tar files. This would be easy with split, but I want the splitted files to be fully usable tar files themselves, which split can't do as it ...
0
votes
1answer
1k views

Failing to extract a tar/bz2 file

File in question is http://code.google.com/p/wkhtmltopdf/downloads/detail?name=wkhtmltopdf-0.10.0_rc2-static-i386.tar.bz2 meder@pc:~$ tar -xvjf wkhtmltopdf-0.10.0_rc2-static-i386.tar.bz2 bzip2: (...
5
votes
2answers
1k views

Linux - Is there a way to convert .bz2 files to .tar.bz2 files using pipes?

Is there a way to convert a .bz2 file to a .tar.bz2 file without decompressing the entire thing to disk and then re-compressing? The decompressed size is larger than my drive. Since bz2 operates on ...
4
votes
1answer
4k views

tar/bz2 compress a file removing uncompressed original

Is there any way to turn a directory called dir1 into dir1.tar.bz2 without keeping the original? I need to save space and want to compress some large files but don't have enough room to keep a ...
1
vote
2answers
257 views

extract archived .bz2 files inside a .tar archive with a single command

i need to decompress .bz2 files inside a .tar archive (two step decompression) For example: requested_files_1.tar has multiple .bz2 files inside. How can I extract them with a single ...
2
votes
1answer
14k views

tar shows “is not a bzip2 file” error when uncompressing a .tar.bz file

I've a data_or.tar.bz file I tried to extract it with $ tar xjvf data_or.tar.bz Output is bzip2: (stdin) is not a bzip2 file. tar: Child returned status 2 tar: Error is not recoverable: exiting ...
0
votes
0answers
24 views

Untar bz2 to Microsd fails

I am trying to uncompress tar.bz2 file to ext3 formatted MicroSD card and after copying some files to card I see below errors and tar fails with below errors tar: ./usr/lib/gcc/gcc/arm-poky-linux-...
0
votes
1answer
22 views

Tar compress directories and contents into individual, dated files based on folder name bash script

This is on a Debian system. I have had the compression of files and contents into individual folders working fine but not with the date added to the file names. Removing the date part, it works as it ...
0
votes
2answers
268 views

Tar to tape : block number and blocking factor

The 64 kiB blocksize is to maximize throughput and avoid "shoe shining". mt -f /dev/nst0 setblk 64k tar -c -v -R -b128 -f /dev/nst0 test_dir returns: bloc 0 : test_dir/ bloc 1 : test_dir/file_1....
31
votes
8answers
165k views

How to open a .tar.gz file in Windows?

I need to open a file that sadly is only available in the .tar.gz file format and I am using Windows 7. I can unzip the file using 7-zip but after that I still have a .tar file that I can't open in ...
1
vote
0answers
33 views

Gzip'd tar archive Spanning Multiple Disks

Very similar to (How to create tar archive split into, or spanning, multiple files?), but specifically I would like to simultaneously: tar and compress a 10 tb directory, having insufficient local ...
0
votes
2answers
53 views

Extract .tar.gz file that has files with .gz extension

Using this question I 'zipped' the folder with thousands of images on apache server. This apparently changed the files inside the folder itself and zipped the files. But that's not the issue atm. I ...
2
votes
3answers
797 views

Archive software for big files and fast index

I'm currently using tar for archiving some files. Problem is: archives are pretty big, contains many data and tar is very slow when listing and extracting. I often need to extract single files or ...
0
votes
0answers
12 views

How to delete files from a tarball by owner or version? Tarball contains files from multiple owners

I was deleting and appending files to a already existing tarball (meaning created by someone else other than me) but now I have duplicated directories from different owners and even from the same ...
-1
votes
1answer
384 views

how to install latest ffmpeg on Centos

I want to install the latest ffmpeg 2.8.5 on the Centos server. Followed this website http://www.mysql-apache-php.com/ffmpeg-install.htm and completed the installation. But the installed ffmpeg is an ...
0
votes
0answers
29 views

FTP files from Linux server to windows client machine whilst maintaining linux file permissions

My local machine runs windows and my website is on a linux server. I want to back up my website to my local windows machine and maintain linux file and folder permissions. Ordinarily I would compress ...
0
votes
0answers
15 views

Strategies To Reduce Compressed File Lookup Time With Pixz?

I have a PIXZ-compressed (level -9) tarball containing around 4000 files (ordered, like pages in a book): compressed size is ~670M. Currently I am programmatically accessing these files using the ...
0
votes
1answer
70 views

tar xvfz and -xvfc both didn't worked in Cygwin on Windows

I tried tar with xvfz and -xvfc both didn't work in Cygwin on Windows. $ tar xvfz sshpass-1.0.5.tar.gz tar (child): sshpass-1.0.5.tar.gz: Cannot open: No such file or directory tar (child): Error is ...