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

learn more… | top users | synonyms

2
votes
2answers
784 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?
52
votes
1answer
93k 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 ...
15
votes
3answers
13k 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
23k 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
28 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 ...
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 ...
0
votes
1answer
36 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
10 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
18 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
40 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
10 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
21 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 ...
0
votes
1answer
22 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
28 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
4 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
29 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 ...
1
vote
2answers
744 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
242 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
13k 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
22 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: ...
0
votes
1answer
20 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
194 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 : ...
30
votes
8answers
157k 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
26 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
44 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
768 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
199 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
23 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
13 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
41 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 ...
3
votes
3answers
11k views

Extracting a *.tar.bz2 file?

I always used to use this command to extract files from a bzip2 tar ball: tar xjvf file.tar.bz2 But right now on Ubuntu 14.04, I get this error: tar: Conflicting compression options Try 'tar ...
1
vote
1answer
45 views

How to copy a .zip from within a .tar to a given location without extracting entire .tar using AWS S3 CLI

OSX 10.11 - python3.5 or AWS CLI (or other tool?) I have ~ 5,000 subdirectories within an Amazon S3 bucket, each subdirectory contains a single .tar. In each .tar it contains only one .zip, ~<1mb ...
0
votes
1answer
79 views

rsync to/from tar archive

Is it possible to rsync a real filesystem (remote) with a tar archive (local)? If so, how? Problem is I need to correctly backup user/group/permission settings and, while I have root access on remote ...
1
vote
2answers
321 views

tar reverse of '--to-command', or: compressing tar entries individually, or: tar with plenty of large files

I would like to create tar gzip archive, but do it the reverse manner of what is most commonly done -- have the files in the archive be compressed individually rather than compress the entire archive: ...
4
votes
2answers
126 views

Archive (.tar.gz) Corruption

I've got a .tar.gz archive that has definitely suffered some kind of corruption. The data inside the archive is obviously very precious to me and I'd really like to get my hands on as much as ...
55
votes
8answers
20k 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 ...
1
vote
2answers
58 views

Recover files from corrupt archive

I have a tar file of 40Gb but when I open it with the archive manager on Ubuntu I get only 512MB. The major part of my files are messing. Even when I do: tar -tf myfile.tar.gz I don't get the list ...
13
votes
6answers
10k views

SVN directly to tar

Is there a way to directly tar the latest version of an SVN folder without the SVN hidden files? I would like to create a tar archive without the SVN files. I know you can get the latest with the SVN ...
0
votes
2answers
52 views

Untarring into a temp directory, then deleting the directory

I'm a very new linux user, and I'm untarring a tarball into a directory, say that without smiling. What I want to do is create a temp directory with the mktemp -d command and use the tar command to ...
15
votes
2answers
8k views

Equivalent to tar's “--strip-components=1” in unzip?

I have a script that extracts a tar.gz-file to a speificed subdirectory mysubfolder: mkdir mysubfolder; tar --extract --file=sourcefile.tar.gz --strip-components=1 --directory=mysubfolder; Is there ...
1
vote
4answers
7k views

tar.gz won't extract on Mac OS X

Why is this not working? sh-3.2# tar -xzf postgresql-7.4.28.tar.gz gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error exit delayed from previous errors
22
votes
9answers
336k views

How to extract a tar file (.tgz) in windows?

How to extract a tar file (.tgz) in windows? Is this possible, or do I have to get into a linux environment and extract it?
0
votes
2answers
116 views

Can a tar.gz file contain malicious code? Is a Mac vulnerable to such a tar.gz?

Can a tar.gz file contain malicious code that is similar to ZIP file? On a Mac particularly? Edit: Oops, I meant to ask the process of opening/untar a tar file on the Mac. Not the contents of the ...