Tagged Questions

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

learn more… | top users | synonyms

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
654 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) ...
23
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 ...
17
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
1k 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
340 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
41k 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 ...