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

learn more… | top users | synonyms

2
votes
3answers
492 views

“tar -czf” for first 5 thousand files

I have a directory with too much files in it. I want to compress first 5 thousand files in that directory to become file.tar.gz and then 5001 - 10000...and so on how to do it?
2
votes
2answers
714 views

Transfer using linux ssh and maintaining permissions

I need to transfer files across ssh to another server. The file structures are identical on both sides. I have used scp -r but that does not retain the orginal file/dir permissions. rsync does the job ...
0
votes
2answers
3k views

How to make sure a .tar.gz file is valid and will uncompress correctly?

I have a few BIG .tar.gz files, and I want to make sure they will uncompress, but without actually doing it. If the file opens on "Archive Manager" on Ubuntu, and I can view it contents there, does ...
6
votes
5answers
56k 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
1answer
106 views

Assigning new creation file time on tar extraction

Does anybody know how i can tell tar to assign a new creation date to extracted files? Let's say I have an archive filled with old files of varying ages. Upon extraction I want all files to have ...
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 ...
2
votes
3answers
924 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
725 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
8k 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 - ...
11
votes
2answers
9k views

How can I create multipart tar file in Linux?

How can I create a multipart tar file in Linux?
1
vote
1answer
955 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 ...
4
votes
3answers
3k 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
471 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
528 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
7k 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
297 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) ...
21
votes
7answers
30k 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 ...
12
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
0answers
1k views

Repair tar.gz files with a GUI

I have been downloading back ups from my web hosts cpanel on a weekly basis. The back ups are in tar.gz format. However, when I try to extract them, I get an error message stating that they are ...
1
vote
2answers
624 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
14k 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: ...
19
votes
7answers
35k 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
463 views

Tar: Update 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 ...
37
votes
6answers
19k 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
4k 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
39
votes
4answers
45k 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 ...
2
votes
5answers
3k 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 ...
7
votes
3answers
2k 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
5k 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
196 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
12k 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 ...
3
votes
3answers
4k 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
6k 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
78 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 ...
6
votes
4answers
532 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
258 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
6k 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
227 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
535 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
777 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?
5
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
492 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 $ ...