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

learn more… | top users | synonyms

2
votes
6answers
2k views

Mounting a .7zip file containing .tar

I have downloaded wikipedia in a compressed form. It is a .7z file, which contains a .tar file. In compressed form it is only 14 GB. If I uncompress it, it has 208 GB in it. And I don't have that much ...
2
votes
1answer
3k views

tar: extract myfile.tar.gz archive to a directory named myfile

Can it be done with tar? Do I have to write a bash script?
1
vote
2answers
1k views

Tar: How to ignore the archive itself

I was planning to do a quick backup of my website. So I tried to run the following command in my webroot: tar cvfz backup.tar.gz . That seemed to be working nicely for a while. Until I discovered ...
12
votes
5answers
8k views

SVN directly to tar

Is there a way to directly tar the latest version of an SVN folder without the SVN hidden files? I would like to create a tar archive without the SVN files. I know you can get the latest with the SVN ...
3
votes
3answers
292 views

tar: million of files

I have to pack circa 7,000,000 small files. I'm looking for an efficient way to do this. Is tar the best way? What about benchmark tests or any other suggestion?
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? ...
10
votes
1answer
8k views

How can I force only relative paths in “find” output?

I am attempting to create a script that can compress files with a certain extension in a number of directories into a single tar-ball. Currently what I have in the script file is: find "$rootDir" ...
1
vote
3answers
4k views

Tar an entire folder EXCEPT a few files and folders?

I have a folder structure like so: file1 file2 file3 file4 folder1 folder2 Without writing each file, how can I tar zip all the files and folders, except file1 and folder1?
2
votes
2answers
1k views

How do I tar/gzip and then delete directories somewhat safely?

How should I tar/gzip and delete files somewhat safely? Background: We're running a little low on disk space on a Ubuntu computer (Hardy Heron), and I want to tar/gzip, verify that it worked, and ...
3
votes
1answer
656 views

Importing to mysql from a .gz via shell - how to do it without extracting to a file? [duplicate]

Possible Duplicate: Pipe gunzip and mysql to gunzip a dump and import it i have a .gz file of an sql dump. at the moment i extract it to its own file (ie dump.sql.gz extracted to dump.sql) ...
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 ...
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/* ...
1
vote
1answer
1k views

Is it possible to continue incomplete tar jobs?

Is it safe to continue an incomplete tar job? Background: I was doing tar -czvf backup_20091013.tar.gz directory1 directory2 ... > tar_log_20091013.txt and to be safe, I put the shell window on ...
3
votes
2answers
1k views

Linux - Is there a way to convert .bz2 files to .tar.bz2 files using pipes?

Is there a way to convert a .bz2 file to a .tar.bz2 file without decompressing the entire thing to disk and then re-compressing? The decompressed size is larger than my drive. Since bz2 operates on ...
5
votes
2answers
2k views

Show tar files sizes

I've got a bad backup script including an unwanted file. The .tar.gz backup file is 5gig big and I'd like to get a list of every file in the archive and their size. Is that possible ? How would you ...
3
votes
3answers
344 views

Opening up a .tar file on Windows

What Windows tool or program can I use to open a .tar file? I also have .tar.gz files that I would like to open.
11
votes
5answers
3k views

Map “untar” to tar xvfz?

How can I map 'untar' as a command to 'tar -xvfz' ? Sorry, but I almost always forget the arguments necessary to 'tar' for this operation.
1
vote
3answers
2k views

programmatically extract tar.gz in a single step (on windows with 7zip)

PROBLEM: I would like to be able to extract tar.gz files in a single step. This makes my question almost identical to this one: stackoverflow question for tar-gz. My question is almost the same, but ...
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 ...