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

learn more… | top users | synonyms

24
votes
5answers
8k views

Why do I get files like ._foo in my tarball on OS X?

When I tar certain files in OS X: tar cvf foo.tar foo It produces an extra file ._foo in the tarball: ./._foo foo which only shows up if I extract it on a non-Mac operating system. But ._foo ...
15
votes
3answers
5k views

Get mac tar to stop putting ._* filenames in tar archives [duplicate]

Possible Duplicate: Why do I get files like ._foo in my tarball on OS X? I create autoconf scripts on a Mac. When tar runs, it puts all of these ._foobar names in the archive: ...
43
votes
4answers
47k 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 ...
19
votes
5answers
17k views

tar – extract discarding directory structure

unzip has a nifty option -j, whereby the directory structure of the archive is discarded, and all files are extracted into the same directory. Is there a way of making tar work in the same way? ...
4
votes
2answers
6k views

How to extract a single folder and its subfolders from a “tarball” (.tar.gz)

I need to extract a single folder and its subfolders from a tarball (.tar.gz) on a CentOS server. I haven't the slightest clue how to do it using an SSH terminal. I tried: gunzip -c ...
2
votes
3answers
220 views

tar-ing / should I use -C / . or just /

tar cvf backup.tar -C / / # or tar cvf backup.tar / produces an archive like etc/ and gives warnings tar: Removing leading `/' from member names tar: Removing leading `/' from hard link ...
1
vote
2answers
14k views

tar Cannot open: No such file or directory

Fresh install of CentOS 5.4 Downloaded the following: http://prdownloads.sourceforge.net/webadmin/webmin-1.510.tar.gz MD5 sum is correct (cdcc09d71d85d81914a90413eaf21d3f). The file is located ...
47
votes
5answers
56k views

How to password protect gzip files on the command line?

I want to create some tar.gz (and possibly tar.bz2) files, using the tar command on Ubuntu 10.04. I want to password protect the file. What is the command to do this (I have Googled, but found ...
42
votes
6answers
24k 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 ...
48
votes
15answers
42k views

Untar, ungz, gz, tar - how do you remember all the useful options?

I am pretty sure I am not the only one with the following problem: every time I need to uncompress a file in *nix I can't remember all the switches, and end up googling it, which is surprizing ...
18
votes
7answers
14k 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/* ...
29
votes
4answers
6k 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?
26
votes
7answers
42k 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. ...
7
votes
4answers
597 views

Tar and gzip together, but the other way round?

Gzipping a tar file as whole is drop dead easy and even implemented as option inside tar. So far, so good. However, from an archiver's point of view, it would be better to tar the gzipped single ...
5
votes
3answers
4k views

rsync hack to bounce files between two unconnected servers

Here's the connection: [Server1] <---> [my desktop] <---> [Server2] Server1 and server2 are not permitted to talk directly to eachother (don't ask). My desktop, however is able to ...
8
votes
3answers
3k views

Is there a way to mount a file.tar.bz2 without extracting it onto the filesystem?

Is there a way to mount a file.tar.bz2 without extracting it onto the filesystem? I don't care if the mount is read only. Hopefully your answer will also apply to file.tar.gz. "mount" in this ...
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
2answers
531 views

What is the difference in various commands for compressing files in linux?

What are the commands for compressing files in linux and what are the difference between them? (for example: tar, gzip, rar). I'm working on Linux Mint 11 and doing a script for compressing files. I ...
8
votes
4answers
3k views

In place extract tar archive

I have a little dilemma here... I needed to move about 70 GB worth of files from one of my servers to the other, so I decided that tarring them up and sending the archive would be the fastest way. ...
5
votes
4answers
7k views

Extract file and folders with specified permissions

I pack a folder with lot of sub-folders and files in Windows with 7zip, upload to VPS and then run the command: tar -xvzf file.tar.gz then all unpacked files and folders have permissions of 777. ...
5
votes
2answers
2k views

Why can't -z be the last command-line option to be used with tar?

$ ls one.tar.gz one.tar.gz $ tar -xvfz one.tar.gz tar: z: Cannot open: No such file or directory tar: Error is not recoverable: exiting now $ tar -xvzf one.tar.gz one $ tar -xzvf one.tar.gz one $ tar ...
3
votes
3answers
515 views

Weird bug in 'tar' not including files named .__init__.py

Does anyone know why tar is not including files named .__init__.py (note the dot)? $ mkdir /tmp/work && cd /tmp/work $ mkdir foo $ touch foo/.__init__.py $ touch foo/.namespace__init__.py $ ...
2
votes
1answer
2k views

How can I extract only some specific folders from a tar.gz archive?

Let's say I have the archive website.tar.gz, inside is the following folder structure : home -mike -www -coolwebsite file1 file2 file3 etc. When I ...
1
vote
2answers
1k views

Linux: Compressing all .pdf files recursively (.tar)

At the linux command line, I'd like to compress all .pdf files in a directory, any of it's subdirectories and so on - but only .pdf files. I'm struggling to figure out the syntax, any ideas ...
1
vote
2answers
585 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 ...
9
votes
5answers
70k 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 ...
3
votes
2answers
296 views

is it plausible that Ubuntu's wildcard * with tar is somehow failing to restore some files?

In this command line sequence I use a *.sh wildcard to restore some files. I got three hits. Knowing that there must be more, I typed in the whole name. For example: goFindRanges.sh. I was able to ...
3
votes
1answer
7k views

Why is “tar” trying to create an empty archive?

I'm trying to use tar to tar files before transfer, so I can keep the entire file path rather than losing it along the way. However, when I try to tar an empty folder, it tells me that it is cowardly ...
2
votes
3answers
2k 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 ...
1
vote
1answer
390 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 ...
1
vote
2answers
805 views

Creating separate archives for a set of files

I have directory containing big list of files. I'd like to gzip each file of a certain mask to a separate archive. How do i do that automatically? For example here's sample directory contents: - ...
0
votes
0answers
18 views

Why does removing a dash break tar?

I was receiving an error ("Exiting with failure status due to previous errors") when I ran this command: tar -cvfz output.tar.gz folder/ But I did not receive an error when I removed the - from in ...
-2
votes
1answer
217 views

How to move a file of 250 GB to another server? [closed]

The hard disk of one of my servers is full, so I need to move a file away from it to make room. I have tried tar -cvf but when I send it to the other server using wget -c, I see it is 100% complete. ...