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

learn more… | top users | synonyms

0
votes
2answers
3k views

How can I compress a large file into smaller parts?

I'm looking for a way to compress a large file (~10GB) into several files that wont exceed 150MB each. Any thoughts?
1
vote
2answers
641 views

Excluding Path While Compressing with TAR/GZ

I am compressing list of files like this: tar cvzf mycompress.tar.gz /dir1/dir2/file1.txt /dir1/dir2/file2.txt However when I uncompressed them the directory /dir1/dir2/ is still preserved. How to ...
6
votes
2answers
16k views

Howto pipe: cp | tar | gzip without creating intermediary files?

Can anyone tell me if it's possible to pipe | this without having to create a physical file anywhere between A and B.tar.gz? This is what I'm trying to do: File A Rename A to B Tar B.tar gzip -9 ...
23
votes
5answers
9k views

Linux / OS X tar incompatibility – tarballs created on OS X give errors when untarred in Linux

When I tar up files on my Macbook and untar them in Linux, I repeatedly get the following warnings/errors: tar: Ignoring unknown extended header keyword `SCHILY.ino' tar: Ignoring unknown extended ...
0
votes
1answer
449 views

Merge tar files in Windows Server

In my server(windows server) I have 3 tar files. (file.tar, file.tar-2, file.tar-3). I want to merge those files. (Those are generated by some server tool). So I am looking for a tool to merge ...
2
votes
2answers
3k views

Git: Is it OK to copy (not clone) a git repository

I'm pretty new to Git and was wondering if it's ok to copy a git repository with common UNIX commands (like cp or tar/untar), rather than through git clone. I'm in the situation where I have a ...
1
vote
2answers
2k views

GREP and TAR all files/directories matching X

I would like to find and gzip/tarball contents of all the folders matching wordpress in my directory, but I am having trouble trying to get the command to work, I thought it was something like find ...
4
votes
1answer
312 views

Tar - split files

i am using the following command to backup and sql file: tar -zcvf "$BACKUP_DST/$FILE_NAME.tgz" "$BACKUP_DST/$FILE_NAME.sql" i want to make sure the compressed file wont be larger then 300mb, if it ...
2
votes
1answer
84 views

Which is better: using flags, or pipes?

As with many things in the *nix world, there is more than one way to generate .tar.gz files. Typically, I use the following: tar zcf /path/to/dir.tar.gz /path/to/dir However, I have seen the ...
0
votes
1answer
221 views

Why is that when I attempt to verify an archive using tar I am displayed the error this does not look like a tar archive?

I am new to the world of linux and when attempting to verify a tar archive I am displayed the following error. When running the command tar cvfW archivename.tar filename directoryname does not yield ...
39
votes
4answers
39k 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 ...
0
votes
1answer
255 views

How to omit the “.” directory when creating a tar from directory?

To create a backup of entire directory I do: tar -cPzf /home/misha/path/to/tar/tar_name.tar.gz -C /home/misha/path/to/directory/to/backup . In the resulting tar_name.tar.gz beside the files ...
2
votes
1answer
720 views

tar - exclude certain files

I wish to tar all files in a directory and its subdirectories that do NOT end in .jpg, .bmp, .gif, or png. So, given the following folders and files: foo/file.txt foo/file.gif foo/bar/file ...
1
vote
1answer
1k views

Convert .tar.gz/.tar.bz2 to .7z in batch?

How do I convert .tar.gz and .tar.bz2 files to .7z files using the command line?
3
votes
1answer
938 views

How to use tar to compress only two files in a directory?

I'm trying to compress only two files in a directory. Let's say I have a directory named 'images'. In the directory, I have a.jpg, b.jpg, c.jpg, and d.jpg. I like to compress only a.jpg and b.jpg ...
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 ...
5
votes
2answers
6k views

What is the fastest compression method for a large number of files?

I need to compress a directory with around 350,000 fairly small files that amount to about 100GB total. I am using OSX and am currently using the standard "Compress" tool that converts this directory ...
0
votes
1answer
124 views

How to create a folder inside a tarball?

I created a tarball with multiple files. The rpm generator requires those files to be inside a folder. I don't want to move the files before generating the tar. Is there a way to create this folder ...
5
votes
5answers
1k views

How to do the equivalent of “grep something * -Rin” on list of tar.gz files?

I've got a bunch of tar.gz files and I want to do a "grep something * -Rin" as I would on them if they weren't tar.gzed. I want to keep them tar.gzed as they are, but grep on them on-the-fly and find ...
2
votes
3answers
213 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 ...
3
votes
1answer
151 views

gunzip -c equivalent for tar.gz files?

What is the equivalent of gunzip -c to pipe the content of a bunch of tar.gz files without having to permanently "tar xzf" them and "tar czf" them back? Something like: tar xzf "-c" *.tar.gz | xargs ...
2
votes
3answers
556 views

Control gzip compression rates while archiving files with tar?

I have a script which periodically backs up a directory using the command "tar -czvf [name] [directory]" but my problem is that the script has recently been putting a lot of stress on the server ...
10
votes
3answers
32k views

How to create tar archive split into, or spanning, multiple files?

According to this page, one can let tar create a tar archive "split" into 100 Mb files: tar -c -M --tape-length=102400 --file=disk1.tar largefile.tgz The problem is that this command will ...
4
votes
2answers
3k views

SunOS tar filename is greater than 100

On a Solaris when creating a tar archive using the cf options: tar cf file.tar dir and when many nested directories generates very long path names, I get the error: tar: filename: filename is ...
1
vote
2answers
463 views

Removing folder structure when making a tar from a folder

Ok I don't really want to waste any more time on investigating this but I do want to offer a .tar option for download instead of just zip. $archive = ...
1
vote
5answers
987 views

tar command to extract archive with colon in the name

I try tar -zxvf plugin\:xyz.tgz and received the error: rsh: Could not resolve hostname plugin: Name or service not known tar: plugin\:thold-latest.tgz: Cannot open: Input/output error tar: Error is ...
0
votes
3answers
11k 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
923 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
199 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)?
11
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.
10
votes
4answers
9k 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
2k 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 ...
8
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
4k 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
4k 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
395 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: ...
28
votes
4answers
5k 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
254 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
662 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
59 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
841 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
5k 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
452 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
443 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
261 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 ...