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

learn more… | top users | synonyms

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 $ ...
12
votes
1answer
238 views

Three formats? Why?

I needed to download the Ruby Source recently from here and it says, "available in three formats" which are .tar.bz2, .tar.gz and .zip. Is there any reason that we need all three formats? At least on ...
2
votes
1answer
1k views

.tgz not extracting properly

I've just received some files file(s).tgz... I've tried tar -xvzf file.tgz... However I'm getting error "Attempt to write to an empty file"... Am I missing something... The folder directory system has ...
2
votes
1answer
1k views

how to split tar in two files

I'm trying to upload my tar'ed site to server but I have upload limit. My ftp program extracts tar after uploading it. How do I split this one tar into two so I could upload one tar and let it extract ...
6
votes
2answers
1k views

tar a directory

I'm trying to tar my website files that are on my test server to be able to upload them to 'real' server. tar -cf mysite.tar /var/www It creates archive fine... but when I open that archive it has ...
1
vote
2answers
517 views

Creating a compressed archive with “tar” over the network

I want to copy a local disk image to another computer in the local network. It is a large directory (around 15 GB) and to speed it up I use this little trick: cd /Volumes/myserver tar -cvzf ...
3
votes
2answers
2k views

Specify root dir inside tarball

Is there a way to execute tar cjvf foo.tar.bz2 project-root Such that when the tarball is extracted, it doesn't extract to project-root, but instead extracts to something else? i.e. tar xjvf ...
6
votes
4answers
22k views

How to tar directory and then remove originals including the directory?

I'm trying to tar a collection of files in a directory called 'my_directory' and remove the originals by using the command: tar -cvf files.tar my_directory --remove-files However it is only ...
3
votes
5answers
343 views

Migrate 80 GB worth of files from one NTFS drive to another with metadata and error correction

I want to copy all my files from my NTFS Windows XP drive to a folder on my new NTFS Windows 7 drive, including Program Files, etc. just in case I need them. I have an external drive I can use as an ...
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 ...
1
vote
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 ...
11
votes
5answers
7k 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
277 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?
18
votes
4answers
14k 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? ...
9
votes
1answer
6k 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
611 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) ...
21
votes
5answers
7k 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 ...
16
votes
7answers
13k 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
865 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 ...
4
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 ...
11
votes
5answers
2k 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 ...
44
votes
15answers
38k 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 ...