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

learn more… | top users | synonyms

3
votes
4answers
1k views

Browsable compressed filesystem archive with full attributes?

Maybe a variation of the whole question would be: Are there any other archiving tools than tar that preserve Linux file permissions and user/group flags? I want to create archives of a directory tree ...
4
votes
1answer
857 views

zip/tar/? files with depth parameter

I would like to zip files from a directory but only to a given depth. In the example below I would like to include files until a depth of 3: dir0/ dir1/ dir2 -> subdir1, subdir2 dir3 ...
2
votes
2answers
9k views

tar command - how to extract one file to specific directory

Is there a way to extract a single file from a tar file to a specific directory? In fact, I am dealing with a .tgz file so, I am attempting something like this : gunzip -c mytargzfile.tgz | tar xvf - ...
12
votes
2answers
11k views

How can I create multipart tar file in Linux?

How can I create a multipart tar file in Linux?
1
vote
1answer
995 views

Tar xvzf question

Hi I use FC12 command : tar xvfz GeoIP.dat.gz I get the errors tar: This does not look like a tar archive tar: Skipping to next header tar: Error exit delayed from previous errors Whats the ...
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 ...
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 ...
2
votes
3answers
496 views

Want to zip up folder with 20K images to upload, how to breakup zips and then unzip?

I have a folder with about 1 gig worth of images I have to upload to a server. I want to zip/tar them up, preferably into multiple files that I can upload to my ubuntu server. Then I want to ...
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 ...
3
votes
2answers
8k views

Does tar -xvf remove existing files from directory?

I have a tar archive and I want to use tar -xvf. In this tar archive I have a directory tree containing a couple of files. On my solaris 10 system this directory tree already exists and has several ...
1
vote
1answer
328 views

untarred files on server has different owner

I am creating a tar gzipp'ed archive on my local machine (as user1) using the following commands: user1@devmachine:~/$ tar czpf dir.tar.gz thedirectory on the server, I untar it (as user 2) ...
22
votes
7answers
38k 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 ...
13
votes
4answers
3k views

How do I create a tar file in alphabetical order?

I want to create a tar file where all of the directories and files are processed in alphabetical order. This is for the entire directory hierarchy that's being tarred up, so it would start by ...
1
vote
2answers
746 views

Is there a way to diagnose a tar file when, on extract, files are missing but no errors are given?

I have tar files where I archive about 250 files, each about 80 Mb, without compression. In a few cases tar is only returning some of the files. For example, when doing an extract of the file using: ...
0
votes
5answers
15k views

tar --files-from complains “Cannot stat: No such file or directory”

When I type: tar -cvf ~/changeset.tar --files-from ~/changeset.txt it responds with this output: tar: admin/memberinformation.php : Cannot stat: No such file or directory tar: ...
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. ...
0
votes
2answers
468 views

How to update a TAR/Gzip archive

I have compressed a folder using tar like this: tar cvfz folder.tar.gz folder/ Now, say I have changed some of the files in that folder, added some and removed some. And now I want to update my ...
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 ...
1
vote
1answer
3k views

Extracting tar file: Cannot open: No such file or directory

I have a remote Debian 5 machine on which I'm trying to extract a tar-file (Django 1.2.1, but that's unimportant). The first 1300 or so files extracts just fine (of about 2800 in total), after which ...
0
votes
4answers
5k 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
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 ...
3
votes
5answers
4k views

tar - exclude does not work

I've supposed to archive a directory with tar and exclude some files. I have a directory $HOME/java which includes some .java and .class files. What I want to do is exclude all .class files using the ...
2
votes
4answers
3k views

Rsync to stdout?

I have access to backup server via rsync protocol (only rsync, nothing else). Now, I want to fetch file from there (which is .tar.gz) and pass it directly to tar command, without saving the archive in ...
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. ...
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 ...
0
votes
2answers
206 views

Untar with date filter

Is there any way to untar and only extract those files that are above a certain date including directory structure?? I restored a backup on a play server but it was a few days old. However I have a ...
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 ...
4
votes
3answers
2k views

how do I use tar -C on Snow Leopard when creating an archive?

The man page states -C directory In c and r mode, this changes the directory before adding the following files. However, tar does not change to the directory I specify, but instead reports ...
4
votes
3answers
5k views

Using find and tar with files with special characters in the name

I want to archive all .ctl files in a folder, recursively. tar -cf ctlfiles.tar `find /home/db -name "*.ctl" -print` The error message : tar: Removing leading `/' from member names tar: ...
12
votes
2answers
8k 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?
1
vote
2answers
81 views

Data Archiving vs not

For the sake of data integrity, is it wiser to archive your files or just leave them unarchived. No compression is being used. My thinking is that if you leave your files unarchived, if there is ...
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 ...
1
vote
1answer
345 views

Can I get the version number of tar used to create a specific tar file?

I need to know the version number of tar used to create a specific tar file. How can I do that?
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 ...
0
votes
1answer
297 views

Can you open a tarball on Mac OS X in the GUI?

If I send a tar.gz file to a Mac OS X user, will they be able to open it in the GUI, just like a zip file?
1
vote
4answers
256 views

Zip only public directory

I've a lot of websites (100+ directories) I want to create a unique zip with only public subdirectory. My structure now is like: - Site 1 --- app --- tmp --- log --- public - Site 2 --- app --- ...
0
votes
1answer
588 views

Binaries for gnu tar and gnu gzip

I would like to know where i can download the binaries for gnu tar and gnu gzip for various platforms ( aix64, hp64, hpia64, intel, linia32, linia64, linx64, solus64, solx64, winx64) Thanks,
0
votes
2answers
4k views

How to delete a tar file after I gzip it?

I am creating a tar file and then I am gzipping the tar file. So I am getting a .tgz file and now I want to delete the previous tar file. ${gzipExe} -f --rsyncable $tarname.TAR --stdout >> ...
1
vote
2answers
844 views

zip file on ubuntu without getting a cpgz file on extraction

I get a cpgz file when trying to extract the contents of a file created on an ubuntu system. Tried with 7zip, rar, zip, tar, nothing works... I really need to get this to work, so if somebody had a ...
1
vote
2answers
2k views

MinGW tar compression problem

I am unable to get the Mingw tar to work with compress files. It does not filter through the proper compression utility. However, tar will work if I manually uncompress the file first. I have tried in ...
1
vote
1answer
63 views

What should I do if tar have no “-I” option?

I found "-I" option of tar is only availbe for Solaris, and no countpart in Linux machine, what should I do to realize same operation?
6
votes
3answers
9k views

How can I remove the leading path from a tar and retar it in memory?

I was thinking I could do something like this: wget -O- http://example.com/funky.tar.gz | \ tar --strip-components 1 -Ox | tar -cf fixed.tar.gz to remove the leading path from all items in the ...
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 $ ...
12
votes
1answer
242 views

Three formats? Why?

I needed to download the Ruby Source recently from here and it says, "available in three formats" which are .tar.bz2, .tar.gz and .zip. Is there any reason that we need all three formats? At least on ...
2
votes
1answer
1k views

.tgz not extracting properly

I've just received some files file(s).tgz... I've tried tar -xvzf file.tgz... However I'm getting error "Attempt to write to an empty file"... Am I missing something... The folder directory system has ...
2
votes
1answer
1k views

how to split tar in two files

I'm trying to upload my tar'ed site to server but I have upload limit. My ftp program extracts tar after uploading it. How do I split this one tar into two so I could upload one tar and let it extract ...
6
votes
2answers
1k views

tar a directory

I'm trying to tar my website files that are on my test server to be able to upload them to 'real' server. tar -cf mysite.tar /var/www It creates archive fine... but when I open that archive it has ...
1
vote
2answers
543 views

Creating a compressed archive with “tar” over the network

I want to copy a local disk image to another computer in the local network. It is a large directory (around 15 GB) and to speed it up I use this little trick: cd /Volumes/myserver tar -cvzf ...
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 ...
6
votes
5answers
28k views

How to tar directory and then remove originals including the directory?

I'm trying to tar a collection of files in a directory called 'my_directory' and remove the originals by using the command: tar -cvf files.tar my_directory --remove-files However it is only ...