Tagged Questions

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

learn more… | top users | synonyms

0
votes
3answers
12k views

How do I compress the contents of a folder using 'tar' over SSH?

How do I compress the contents of a folder using the tar command on an Unix system over SSH?
1
vote
3answers
1k views

Linux tar command with exclude

I want to create tar file of a folder but this folder contains some tar.gz files like abc.tar.gz, pqr.tar.gz which i don't want to include so how to exclude this files while making the ...
1
vote
2answers
201 views

Linux/Ubuntu: How to make archive when there are too many files (6GB = 3 000 files)?

So, how to make a few archive parts or how to make archive for some part of files (0-100 items, than 1000-200 items etc)?
12
votes
2answers
6k views

How to use password protection with the Linux tar command?

How can I use password protection with the tar command in Linux? I'm new to Linux so please explain to me with simple usage.
11
votes
5answers
10k views

.tar files without directory structure

I'm .taring some files with the path example/super_user/Output.*. The resulting .tar looks like this: + example + super_user - Output.zip - Output.xml - Output.txt ...
3
votes
2answers
3k views

tar -C with a wildcard file pattern

Can I use the tar command to change directories and use a wildcard file pattern? Here is what I am trying to do: tar -cf example.tar -C /path/to/file *.xml It works if I don't change directory ...
9
votes
3answers
3k views

Is it possible to mount a .tar file?

The only result of any import when I searched for this was from 2001. In the intervening decade, have any tools/methods for mounting a tar file as a filesystem (perhaps utilizing fuse) been created? ...
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: ...
2
votes
1answer
3k views

is Winrar's “store” mode the same as tar?

The question kind of says it all. When archiving files with Winrar you get the option of different compression modes, one of which is "store". I'm under the impression this does no actual compression ...
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 ...
4
votes
1answer
5k views

Put date into backup .tar.gz filename

I'd like to run a simple tar command to backup my website directory. It will run through cron, but I want to be able to put the time at which the backup was made as the filename. I don't really mind ...
1
vote
2answers
98 views

When I'm compressing GBs of data with 10k plus of files and directories, how do I know there's no corruption?

To limit the focus of the question, I'm going to say using Linux as the OS, and tar as the compression format. Clearly run-time is important, but knowing the archive is valid is more important. If ...
1
vote
3answers
2k 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. ...
0
votes
1answer
402 views

Problem restoring from tar backup: why are there /dev/disk/by-id/ symlinks and how can I avoid them?

I'm trying to make a bare-bone backup system with the most basic tools available on openSUSE 11.3 (in this case: bash, fdisk, tar & grub legacy) Here's the workflow for my scripts: backup.sh: ...
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?
0
votes
1answer
263 views

backup of old Mac, but tar says: Error exit delayed from previous errors

I try to backup an old Mac OS X Tiger 10.4 before upgrading it to 10.6. All the files to be backed up are located within the /Users/Johndoe folder. cd /tmp sudo tar cvpf backup.tar /Users/Johndoe ...
4
votes
2answers
715 views

How to make TAR to not save the directory hierarchy

system("tar -czf #{RAILS_ROOT}/tmp/export-result #{RAILS_ROOT}/tmp/export") When I decompress the resulting file I get app/c3ec2057-7d3a-40d9-9a9d-d5c3fe3ffd6f/home/tmp/export/and_the_files I ...
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 ...
1
vote
0answers
61 views

tar writes on read

I have an issue with tar. I'm tarring about 120GB of small files, and I feel i'm hitting a bottleneck. My system has 3 HDs, one for the system (sda), one with the files (sdb) and one target HD for ...
0
votes
1answer
890 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: ...
1
vote
5answers
6k views

How can I run the “tar -czf” command in Windows?

I am currently running a computer which has access to only Windows. I have to submit a folder after running tar -czf on it. How can I do this in Windows, do I have any options?
0
votes
1answer
478 views

Does tar provide a method to tar up only files listed in a particular file?

The question title is pretty weird, but basically I have a file that is a list of other files, lets say FilesIWantToTar.dat. I want to say something along the lines of tar -c ...
0
votes
0answers
485 views

how to tar files with long name/long path

When I tar files with long path name, the file name is converted to "637", and the file doesn't exists in the packing file. I try to use gtar, with no successful. Do I need specific version of ...
2
votes
2answers
322 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
0answers
235 views

Auto-untar/gunzip a multilayer tarball in Win XP/7

I review a disgusting ball of knowledge each day that I'd like to think up a way to organize more automatically. The structure looks like this - Parenthesis show the number of files of that type in ...
0
votes
7answers
4k views

“tar -xzf” for many “tar.gz” files in a directory

I have many files in a directory. every one of them have very different name: one.tar.gz juk.tar.gz cv.tar.gz erf.tar.gz vcx.tar.gz cxcd.tar.gz vc.tar.gz jkjk.tar.gz zxc.tar.gz asd.tar.gz ghj.tar.gz ...
17
votes
9answers
238k 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
1answer
80 views

Getting some garbage text when tar-ing a file

when I run the following command: tar -c music.tar iTunes\ Music/ But I get the following garbage output. ...
2
votes
3answers
535 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
736 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 ...
1
vote
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 ...
9
votes
5answers
66k 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
112 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 ...
3
votes
4answers
997 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
819 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
988 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
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
489 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
568 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
319 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
36k 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
712 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
40k 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. ...