0
votes
1answer
12 views

tar -czvf with no output file

Say you run tar -czvf some_folder_here and don't actually specify an output file, like tar -czvf some_output_file.tar some_folder_here. Where does the file go? I just ran this by accident, and the ...
0
votes
3answers
43 views

Zero sized tar.gz file found inside a tar.gz file

My current directory contains a single file like this- $ls -l -rw-r--r-- 1 root staff 8 May 28 09:10 pavan Now, I want to tar and gzip this file like $tar -cvf - * ...
0
votes
1answer
43 views

Extract specific folder from a tar.gz

I know this question was previously asked on this site before like here 1 and here 2 but no success for me. I want to extract the Measures folder from my S012011_csv.tar.gz zipped file. If I do tar ...
0
votes
1answer
514 views

How do you extract a file using tar in AIX?

On a NORMAL Unix distro, tar zxvf works but seems like my machine has some super old version of tar that doesn't have the right parameters. -bash-3.00$ tar zxvf qemu-1.7.0.tar.bz2 Usage: tar ...
0
votes
1answer
40 views

Extract single file from tar without taking its directories with it

I'm currently using this command tar -zxvf foo.tgz -C /root/dir1/ dir2/dir3/dir4/dir5/file to extract my specific file from a tar archive to a given directory, dir1. As is, I end up with ...
1
vote
1answer
299 views

Extract a single file from a tar file to another directory

I have a tar file and I need to extract a single file from it and put it to another directory. I tried this but it gives an error message. It did extract the file but not to the directory that I want ...
1
vote
0answers
76 views

How to create Unix tarball with various file permissions inside on a Windows box?

Could anyone enlighten me on how can I create a regular Unix tarball archive (e.g., tar.gz or tar.bz2) on a Windows box in a way that will mark some files in that archive as "executable" (e.g., with ...
1
vote
1answer
80 views

How much additional disk space does tar require

I am moving a tar.gz archive between servers and had to note that when extracting the archive a large amount of additional disk space is used. My original data size is 12G, 7.8G compressed and ...
2
votes
2answers
644 views

How to stop tar from archiving the root path to files?

When I run the following command: tar cfvz backup.tar.gz /path/to/my/files/* It gzips the entire path. So when I unzip the file, I have to go open 4 folders (path -> to -> my -> files) to get to ...
0
votes
3answers
103 views

How to tar/zip a parent directory exculding a child direcory

I want tar a direcory which contains a number of child directories. But here my requirement is to tar the entire parent direcory excuding one child directory. Is there any command or procedure for ...
3
votes
2answers
410 views

Installing Subversion on Unix machine

I'm new to unix and trying to create a guide for users to install subversion. I've found a tutorial about how to build from a tarball. I'm ready to try it out, but I don't know how to download the ...
163
votes
17answers
13k views

What is the advantage of using 'tar' today?

I know that tar was made for tape archives back in the day, but today we have archive file formats that both aggregate files and perform compression within the same logical file format. Questions: ...
0
votes
0answers
67 views

LZMA Based Archiving on Linux

I am trying to build an archiving system. I have tested out LZMA compression algorithm, and it provides very good results. However, I need the ability to add and retrieve(will remain in the archive) ...
0
votes
1answer
280 views

Find a list of files from text file in subdirectories and put into tarball?

I have a list of files I need to tar. Typically, I would use tar -cvf allfiles.tar -T mylist.txt But I discovered that the files I need are scattered into subdirectories and my list only has the ...
2
votes
1answer
168 views

UNIX shell command to expand files of any compressed type

Is there any UNIX shell command to expand a compressed file which type is not known in advance? I should be able to use this command to expand at least any of the following types of files, though the ...
0
votes
2answers
1k views

Extract specific files in a tar archive using a wildcard

I'm trying to create a script to extract only jpeg pictures from an archive containing many kind of files. To do so, I tried to use: tar -xf MyTar.tar *.jpg but it failed (*.jpg not found) and ...
1
vote
4answers
1k views

Does tar preserve links? [duplicate]

Possible Duplicate: How can I tar ball a directory hierarchy with soft links in linux I am using tar to copy files and directories from a Solaris machine to a Linux machine. Does Tar ...
3
votes
1answer
393 views

Why /home folder is missing from my backup archive created by tar?

So I'm doing full backup of my VPS using the following command (as root, of course): tar czvf 20120604.tar.gz / Everything seems to be fine, all files seem to appear in the list. The size of ...
2
votes
1answer
189 views

Can tar be forced to exit on the first error?

By default, for many kinds of errors tar prints a message to stderr and then continues on its way -- the errors it calls "recoverable" errors, typically errors that relate to a single file or archive ...
0
votes
2answers
146 views

Used tar with wrong order of arguments and overwrote original file. Any way to recover?

Pretty noob move but used tar with the source and destination file arguments swapped resulting in a complete mess (the source file has been overwritten with another file of same name with size 4kb). ...
0
votes
2answers
244 views

Combining files in .tar file in Linux

I have a problem with zipping files in .tar file in Linux, but the challange is that when we extract .tar file it shouldn't give us a folder containing files which are zipped . It should give just ...
2
votes
1answer
4k views

Unable to open a tar.gz file

Are there any alternative ways to open a ".tar.gz" file than -xzf or -zxvf or xzvf? I am running Mac OS X 10.7. My command line returns: tar: Unrecognized archive format tar: Error exit delayed from ...
0
votes
2answers
184 views

tar doubled the size of the directory

Under Solaris 10 I have directory called apps. I go into that directory and enter: -bash-3.00# du -hs 7.2G . Then I entered: tar -cvf /var/run/apps.tar apps The result: -bash-3.00# ls -lad ...
0
votes
1answer
62 views

Modifying the path inside an archive for extraction

I would like to change the path of extraction of a .tar.gz archive. The files are supposed to extract as ./1/2/3/4/files, ./1/2/3files and so on. The .1/2 part of those is common to all the files. ...
4
votes
4answers
13k views

How do I password protect a .tgz file with tar in Unix?

I'm using the Unix tar command as follows to tar up a directory and its files: tar cvzf fileToTar.tgz directoryToTar Is there a way to password protect the .tgz file? I've created ...
1
vote
1answer
88 views

Ignoring path while archiving with TAR

I have a file that contain list of files I want to archive with tar. Let's call it mylist.txt It contains: /path1/path2/file1.txt /path1/path2/file3.txt ... /path1/path2/file10.txt What I want to ...
1
vote
2answers
640 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 ...
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 ...
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 ...
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?
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 ...
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? ...
0
votes
0answers
442 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 ...
21
votes
7answers
31k 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 ...
0
votes
2answers
463 views

Tar: Update archive

I have compressed a folder using tar like this: tar cvfz folder.tar.gz folder/ Now, say I have changed some of the files in that folder, added some and removed some. And now I want to update my ...
38
votes
6answers
19k views

Is there a way to see any tar progress per file?

I have a couple of big files that I would like to compress. I can do this with for example tar cvfj big-files.tar.bz2 folder-with-big-files The problem is that I can't see any progress, so I don't ...
3
votes
3answers
4k views

Using find and tar with files with special characters in the name

I want to archive all .ctl files in a folder, recursively. tar -cf ctlfiles.tar `find /home/db -name "*.ctl" -print` The error message : tar: Removing leading `/' from member names tar: ...
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 ...
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? ...
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
615 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) ...
1
vote
1answer
881 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 ...
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.