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

learn more… | top users | synonyms

1
vote
2answers
23 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
2answers
195 views

Put tar'd files in a subdirectory

I have a directory setup like the following: folder_x file.y file.z I would like to create a tar file so that when it's extracted the structure will look something like this: dir_q/folder_x ...
0
votes
1answer
21 views

Sqoop Tar ball unpacking

I'm working through the installation directions for Sqoop: Sqoop server supports multiple Hadoop versions. However as Hadoop major versions are not compatible with each other, Sqoop have ...
16
votes
7answers
12k views

How can I create a zip / tgz in Linux such that Windows has proper filenames?

Currently, tar -zcf arch.tgz files/* encodes filenames in UTF, so Windows users see all characters spoiled in filenames which are not english, and can do nothing with it. zip -qq -r arch.zip files/* ...
13
votes
4answers
18k views

Extract 7z files with standard linux tools?

I know that you can extract .7z files with 7-zip. Is there another standard linux program that can do this? Maybe one of these tar bzip2 xz gzip I will add that bsdtar can do this, but is not ...
0
votes
0answers
22 views

redirect tar notices when used with pipe

I have a remote backup cron script that contains the following line: cat ${list} | xargs tar Jlcf - | ssh -i /root/.ssh/backup \ seron@dummy.net "backup_${DATE}.txz" It gives tar a list of ...
2
votes
2answers
51 views

How to extract tar file on Windows, when the filenames include a colon?

I have a tar(.gz) file created on a Linux system, and the filenames contain colon characters. The tar utilities I can find on Windows don't extract these files at all. How can I do this, ideally ...
-1
votes
1answer
23 views

Backing up a directory of data incrementally in linux

I have a directory full of files that remain relatively static. However, some files are moved between subdirectories. I create a full backup every month of this data because it's a lot of data. I'd ...
0
votes
3answers
230 views

How can I create a tar file from a list of files in another tar file?

I have a process that creates a tar file with copies of files that need to be updated. I want to backup existing files before overwriting with the new files. I've tried tar cf backup.tar -T `tar ...
1
vote
1answer
70 views

in place refreshing of a large tar.gz?

I have a directory with about 300Mb of code and data, and I need to regularly change a few lines of code in a few of the files and repackage the directory into a new project-version.tar.gz. It takes ...
10
votes
2answers
331 views

Compressing many similar big files

I have hundreds of similar big files (30 megabyte each) which I want to compress. Every pair of files have 99% of same data (less then 1% difference), so I expect to have not more than 40-50 megabyte ...
3
votes
4answers
10k views

How do I password protect a .tgz file with tar in Unix?

I'm using the Unix tar command as follows to tar up a directory and its files: tar cvzf fileToTar.tgz directoryToTar Is there a way to password protect the .tgz file? I've created ...
0
votes
3answers
55 views

How to install a tar.gz on Windows?

I have installed a MPD (Music Player Daemon) on my Raspberry Pi (running under Unix). Then GMPC (the client) on Windows. There is a plugin for the GMPC to catch the album covers, but it is a tar.gz ...
1
vote
3answers
1k views

tar: cannot open: no such file or directory

I am trying to follow the instructions here to install Jetty on ubuntu but I am running into a problem when I try to use tar. cd /usr/local/src sudo wget ...
7
votes
4answers
6k views

How to obtain maximum compression with .tar.gz?

The way i understand the use of tar + gzip is that tar is normally used to consolidate a grouping of files into a single file, then gzip is used to compress that file. I recently learned that tar can ...
1
vote
5answers
31 views

List files in a tarball over internet

To list an archive's contents I can do : tar -tzvf mytarball.tar.gz But this works for local files only. Can someone point out how to do it (if at all possible) for files over internet. I tried it ...
1
vote
1answer
22 views

How can tar backup access timestamps

How can tar backup file access timestamps so it is included somewhere in the *.tar file? I couldn't find this in the docs, the closest was --atime-preserve, which preserves access times on the source ...
1
vote
3answers
1k views

Installing software from tar.gz on Linux (Ubuntu) - where to start and where does it end up?

I am usually a Windows user, but I have decided to check out Django, and was recommended doing this on a Linux box. I downloaded the Django-1.2.5.tar.gz, and by default it ended in the tmp folder. ...
3
votes
2answers
2k views

Specify root dir inside tarball

Is there a way to execute tar cjvf foo.tar.bz2 project-root Such that when the tarball is extracted, it doesn't extract to project-root, but instead extracts to something else? i.e. tar xjvf ...
0
votes
1answer
15 views

Tar up only 3 specific files in command line with linux

Is it possible with one command to tar up 3 files into one tar archive? For example, tar up: public_html.tar.gz dbapp.sql dbwp.sql into a tar file called bak.tar.gz
0
votes
1answer
13 views

How to use pv to see decompression progress?

I've seen: How to use Pipe Viewer (pv) for measuring compression progress? Is there a way to do the same thing for decompressing a gzipped file?
1
vote
1answer
301 views

How to use Pipe Viewer (pv) for measuring compression progress?

I've been trying to track the progress of the data in a pipe, specifically in a large init script for a minecraft server. How would I go about using pv to get an accurate readout of progress? I've ...
12
votes
4answers
7k views

TAR vs CPIO, what is the difference?

I am curious and did a bit of reading but still have questions. What makes CPIO different than TAR? I was told in another question that tar is for pulling together many files into 1 archive which ...
34
votes
6answers
17k views

Is there a way to see any tar progress per file?

I have a couple of big files that I would like to compress. I can do this with for example tar cvfj big-files.tar.bz2 folder-with-big-files The problem is that I can't see any progress, so I don't ...
12
votes
2answers
5k views

unpack 'tar' but change directory name to extract to

tar -tf filename.tar folder1/file folder1/name [...] I'd like to extract file and name to, folder2. Can this be done as a one-liner?
0
votes
0answers
58 views

Download zip/tar Github repository with .git metadata?

I need to download zip/tar Git repositories from Github and get not just the source but also the .git directory. I'm aware I could use git clone, but this is for an tool that runs on systems that may ...
1
vote
2answers
22 views

Tar incremental option does not add new files

In an incremental backup, tar does not seem to be able to add new files : $ tar -cvzf test.tar.gz -g test.snar a.txt a.txt $ tar -cvzf test2.tar.gz -g test.snar a.txt b.txt The second command ...
38
votes
4answers
33k 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 ...
1
vote
2answers
41 views

List contents of large tar archive quickly

I need to list the contents of a fairly large (gzipped) tar archive (about 37GiB). tar -ztvf archive takes forever. Is there some way to get this listing quickly? Possibly by only listing contents ...
0
votes
1answer
130 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 ...
0
votes
2answers
33 views

Does creating a tar file need more space?

HTTP File Server or HFS is a small utility which allows one to share files with others by creating http links for every file Now when I want to download multiple files, the software creates a "tar" ...
0
votes
2answers
34 views

Is it possible to give “out-of-the-box” programs an executable command in Linux?

I don't know if I'm being clear. Take the following scenario: You have downloaded a .tar.gz compressed program, you unpack it, and it runs right from there. It's not source code, just an application ...
1
vote
1answer
46 views

Extracting a .tar.gz I get a file without extension

The file is this: http://sourceforge.net/projects/cpuminer/files/pooler-cpuminer-2.3.2-linux-x86.tar.gz As usual I do tar -xvzf pooler-cpuminer-2.3.2-linux-x86.tar.gz but I just get a file ...
2
votes
1answer
34 views

Given that tar ignored my 2 sockets, how do I backup and then restore my login folder?

I did a network backup of my login area in preparation for reformatting the volume in which it resides to make it bootable on my old Power Mac G5 running the very latest release of Leopard. Though ...
0
votes
0answers
15 views

Is there an option to make 'tar' warn when an archive doesn't contain a single top-level directory?

I personally dislike it when tar/zip files contain many files without a base directory. For example, mypackage.tar.bz2 ├── a.txt ├── b.txt └── c.txt instead of mypackage.tar.bz2 └── mypackage/ ...
1
vote
6answers
417 views

How do I tar dot files but not dot directories

The following tar command will exclude all dot files and dot directories. tar -cvzf /media/bjackfly/bkup/bkup.gz --exclude '.*' --one-file-system /home/bjackfly In my case I want the dot files to ...
0
votes
3answers
371 views

extract single file from huge tgz file

I have a huge tar file (about 500G) and I wan't to extract just a single file from it. However, when I run tar -xvf file.tgz path/to/file it seems like it is still loading the whole contents into ...
20
votes
7answers
26k views

Which is more efficient - tar or zip compression? What is the difference between tar and zip?

I'm working in Linux environment and want to know about tar and zip commands. Which is more efficient - tar or zip? I also need to know the differences between the tar and zip commands. Can anyone ...
3
votes
3answers
237 views

linux tar -T - does not work on the fly

I found some problem with linux gnu tar. wheh I use option -T - (for file list from stdin) or -T named_pipe_file , this desn't work on the fly. for example, simple interactive script: while ...
1
vote
1answer
50 views

How to convert a file of format tar.gz to tar.bz2?

Like the title says, how do I do this conversion from the Linux console?
18
votes
7answers
31k views

tar: Exiting with failure status due to previous errors

I have written a little script that tars and compresses a list of directories + files. The script appears to run succesfully, in that a useable .tar.gz file is created after the script runs. ...
1
vote
1answer
737 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 ...
7
votes
2answers
191 views

let tar auto detect compression type when extracting from stdin

I use GNU tar. It can auto detect compression type when compressing/decompressing files. But I need to decompress an archive from stdin and the compress type is unknown. I noticed that tar can give me ...
0
votes
1answer
199 views

How do you extract a file using tar in AIX?

On a NORMAL Unix distro, tar zxvf works but seems like my machine has some super old version of tar that doesn't have the right parameters. -bash-3.00$ tar zxvf qemu-1.7.0.tar.bz2 Usage: tar ...
1
vote
2answers
73 views

How “tar” command manages to “see” changed files between two incremental backups

How tar command checks whether a file is changed or not? How tar "knows" that this file is changed and it has to go in the next incremental backup? I have some assumptions: it may compare "mtime"; ...
1
vote
1answer
74 views

Avoid errors from tar failing to restore directory permissions

I observe the following behavior with both tar 1.26 and 1.27.1: $ mkdir a b a/diffowner $ sudo mkdir b/diffowner $ sudo chmod a+w b/diffowner $ echo foo > a/diffowner/foo $ tar -C a -cvf test.tar ...
2
votes
1answer
50 views

wget download from mirror download links

I'm trying to download using wget a tar.gz. The file is redirected based on the url parameters, so all downloads are redirected automatically. for example: wget ...
0
votes
0answers
19 views

On Windows 7+ - how to unpack .tar.bz2 with single click using 7-zip or other tool? [duplicate]

Assume a user that often gets double packed files and wants to avoid wait 10 min to get .tar out of 2GB file and then wait another 10 min to again unzip .tar. Is there way to do it in one process? ...
0
votes
1answer
24 views

Most sensible way to archive email to a tar.xz

I would like to archive all my old email in a way that I could easily restore it later if I need to reference it. What is the most sensible format to export/store my email before I then tar it? eg. ...
1
vote
4answers
4k views

Using wildcards with tar

I am using this command to backup some important configuration files: tar -czvf /var/backups/201102121202.tgz -C / etc/crontab etc/httpd/conf.d/* etc/httpd/conf/httpd.conf etc/httpd/passwords ...