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

learn more… | top users | synonyms

2
votes
6answers
8k views

how to copy entire linux root filesystem to new hard drive on with ssh and tar

I know I've found this information before, but can't remember the right google query. I need to transfer an entire linux root filesystem off of a failing hard drive onto another computer with an ...
0
votes
1answer
207 views

How do I use tar to transfer through ssh on a non standard port?

I am trying to transfer all files from within a directory through tar as follows: tar cz * | ssh -p 57310 root@example.com tar xzv -C /home/site/www and the error that is returned is stdin: is not ...
0
votes
2answers
520 views

What is the difference in various commands for compressing files in linux?

What are the commands for compressing files in linux and what are the difference between them? (for example: tar, gzip, rar). I'm working on Linux Mint 11 and doing a script for compressing files. I ...
0
votes
3answers
108 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 ...
1
vote
1answer
899 views

Why is this archive failing to create symlinks?

When I extract the archive Symfony_Standard_2.2.1.tgz using this command: $ tar xzf /home/tomas/downloads/Symfony_Standard_2.2.1.tgz I always get the errors: tar: doctrine.php: Cannot create ...
1
vote
3answers
3k views

Between xz, gzip, and bzip2, which compression algorithim is the most efficient?

Between xz, gzip, and bzip2, which compression algorithm gives the smallest file size and fastest speed when compressing fairly large tarballs?
1
vote
2answers
219 views

extract to folder with tar command

I want to extract a tar.bz2 file to specific folder. Problem is that tar xjf will extract the content without extracting to a folder. Assume I have 1.tar.bz2. I want to have a result like this ...
3
votes
2answers
952 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 ...
2
votes
1answer
426 views

Rename directory with tar

I have some directories, I want to pack into a tgz archive: /home/stofl/myproject/migrations/ /home/stofl/myproject/source/ /path/to/my/migration/tool/source/ The archive should have the following ...
1
vote
0answers
82 views

keeping Snow Leopard's directory timestamps when extracting a tar in Mountain Lion

I have a directory in a Snow Leopard box that looks something like: MyDir/ file1 SubDir1/ file2 SubDir2/ file3 I created an encrypted archive of it (still in Snow ...
2
votes
2answers
5k views

.tgz file- tar: Unrecognized archive format

I'm trying to install a 10gen build of mongodb on my local mac running Mountain Lion (10.8.3): I fetch it with curl at: curl http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.4.tgz > ...
170
votes
18answers
15k 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
3answers
484 views

How can I create a tar file from a list of files in another tar file?

I have a process that creates a tar file with copies of files that need to be updated. I want to backup existing files before overwriting with the new files. I've tried tar cf backup.tar -T `tar ...
0
votes
1answer
36 views

Removind same *.tar.gz archives

I have crontab event archives to .tar.gz some folder every N hours. Finally I have collection of .tar.gz files. Now I want remove duplicating archives (created while target files stays unchanged) How ...
0
votes
2answers
2k views

tar: --exclude=“.git”: Cannot stat: No such file or directory

This is driving me crazy. I want to tar a directory, but exclude some files. This is my command: tar -zcvf $NAME-$VERSION.tar.gz $NAME-$VERSION --exclude='.git' --exclude='.gitignore' While the ...
0
votes
0answers
81 views

script on a remote machine that archive files fails

I have a simple script (Given below) on a machine that collect files from several folders into a single one and then archive it. The script works as expected on the remote machine. When I run it via ...
0
votes
1answer
729 views

One-click to create and extract .tar.gz files in Windows?

I'm using 7-zip latest alpha version (9.30) and I find it really inconvenient that, if I want to create a .tar.gz archive, I have to create a .tar archive first then add it to a .gz archive later. So ...
1
vote
2answers
294 views

tar backup zsh script

Trying to set up a cronjob ran tar script to backup site (without .git and setup folder) every night and upload time stamped archive to Dropbox. It gives me a hard time as archive is created along ...
2
votes
1answer
7k views

How to extract .tar.bz2 directly? (avoiding a folder creation)

I always extract this kind of files using on the route where I want those files: # tar -xvf file.tar.bz2 But it always creates a folder called "file" (for this example) and stores all inside it. ...
0
votes
1answer
86 views

Extract untarred files from a tgz in linux

I have a large .tgz file which is of very large size(19GB). I started the untar operation in vmware last night but in the morning, I saw a blue screen of death. I dont want to waste time on untarring ...
1
vote
2answers
382 views

What's the difference between /proc and /proc/ (with a trailing slash)?

I try using tar to backup my files. With --exclude=/proc/, the archive contains files under /proc, and --exclude=/proc does not. What causes the difference? P.S. The shell I use is Bash.
0
votes
1answer
351 views

Tar file changed as we read it

Does tar skip any files that produce the error "file changed as we read it"? The version of tar I am using is 1.14.
0
votes
2answers
100 views

Is it possible to provide a blacklist of filenames to tar to prevent those files from being added to the archive?

Something along the lines of tar --blacklist='foo.bar foo.baz' -czvf foo.tar.gz ./* such that any files named foo.bar or foo.baz in the current directory or subdirectories would be ignored?
0
votes
1answer
210 views

How do bash scripts expand file globs?

In this code, the excludespec variable is expected to match all it substring, but it appears to evaluate the to the actual files matching it when it is executed, rather than pass its exact ...
0
votes
1answer
138 views

Zip, tar: is there a file table

Is there a file table, or inode structure (like in filesystems) of a zip or tar file?
0
votes
0answers
72 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) ...
1
vote
1answer
79 views

in place refreshing of a large tar.gz?

I have a directory with about 300Mb of code and data, and I need to regularly change a few lines of code in a few of the files and repackage the directory into a new project-version.tar.gz. It takes ...
1
vote
2answers
1k views

How to Copy Large Directory to External Hard Drive Linux

I've formatted a 3TB external hard drive as ext4 using fdisk (actually gnu fdisk), mounted it at /media/external and am trying to copy my entire home directory to it. My first attempt I thought was ...
6
votes
1answer
7k views

How can I use tar command to group files without compression?

I have a very large folder of 120,000+ files. and I need to move them to another location on my same machine (same partition). I'd like to use the tar command to group them up as a single unit and ...
1
vote
1answer
392 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
2answers
6k views

What command to use to unpack a .tar.gz file in Windows?

I use to receive tar.gz files fromm colleagues but unpacking them with 7zip is not convenient as it unpacks a tar file from gz first while I usually seek to get the tar file contents (so I have to ...
2
votes
0answers
185 views

How to make tar only match patterns to extract on a certain directory?

The extracted tgz contains a structure approximately like: Source header.h bozo.h dir2 anotherheader.h The following: tar xzf libm.tar.gz --strip-components=2 Libm-2026/Source/*.h/ extracts ...
2
votes
1answer
151 views

tar - how to exclude like this: “/path/excludeRoot/**/directoryToExclude”

I would like to exclude some directories from backup. But not all with specific name - only those lying under specified root directory. With rsync I would use exclude mask like this: ...
2
votes
2answers
1k views

Find out the size of a .tar.gz archive in the terminal without unpacking

I have a 32GB .tar.gz archive and I'd like to know the size of the files if I unpack this compressed archive. I'd like to avoid unpacking the archive first and than use e.g. du. Is it also possible ...
0
votes
1answer
143 views

How to install get-iplayer from source file?

I want to install the latest version of get-iplayer in Debian, and I've got its source file, a tarball file, from here. However, I don't know what to do with it. Usually when I come across a tarball, ...
4
votes
2answers
3k views

Equivalent to tar's “--strip-components=1” in unzip?

I have a script that extracts a tar.gz-file to a speificed subdirectory mysubfolder: mkdir mysubfolder; tar --extract --file=sourcefile.tar.gz --strip-components=1 --directory=mysubfolder; Is there ...
0
votes
3answers
552 views

How can I untar a filesystem backup into a VM disk image?

I've been provided a .tar.gz archive containing the files from a VM file system (but not the filesystem itself) and I need to untar these into a raw disk image so that I may mount them as a VM. How ...
2
votes
1answer
180 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 ...
-1
votes
1answer
413 views

download a large file TAR using SFTP

I am trying to download from a remote server ( in UK I am in the USA) a large file using SFTP (50GB) It starts but (maybe 10% done) it abandons it and says "too large" Is there another way to get ...
9
votes
4answers
13k views

How to obtain maximum compression with .tar.gz? [duplicate]

The way i understand the use of tar + gzip is that tar is normally used to consolidate a grouping of files into a single file, then gzip is used to compress that file. I recently learned that tar can ...
0
votes
2answers
58 views

How to install vimtrainer?

I'm trying to install vimtrainer. First I did: $ svn co https://vimtrainer.svn.sourceforge.net/svnroot/vimtrainer/trunk vimtrainer $ cd vimtrainer Then made sure ruby, rubygems, rake and vim with ...
0
votes
2answers
88 views

Extract a section of a tgz file

I have a 28.5 GB .tgz file which was created on the command line of a Linux computer, compressing one folder and all its many many subfolders. I now want to extract a single sub-sub folder from that ...
1
vote
1answer
388 views

How to use Pipe Viewer (pv) for measuring compression progress?

I've been trying to track the progress of the data in a pipe, specifically in a large init script for a minecraft server. How would I go about using pv to get an accurate readout of progress? I've ...
10
votes
2answers
20k views

Linux Bash Script, Single Command But Multiple Lines?

I have the following script I wrote by searching Google, and it backs up my Linux system to an archive: #!/bin/bash # init DATE=$(date +20%y%m%d) tar -cvpzf ...
0
votes
2answers
2k 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 ...
3
votes
1answer
453 views

merge all tar files on mac

I have a bunch of tar files such as a.tar b.tar. I use the following command to merge two tar files : tar --concatenate --file=a.tar b.tar However, --concatenate is not support on mac terminal ...
-1
votes
2answers
370 views

tar -xvf *.tar.gz gives me a weird name on extraction

I have a file "elasticsearch-servicewrapper.tar.gz". When I try to run: tar -xvf elasticsearch-servicewrapper.tar.gz I expect the extracted folder to be called ...
1
vote
1answer
885 views

update file in tar

for Linux tar command: tar uf test.tar test.txt but for *BSD bsdtar command option u = r = append,that is can't update file ,only can append file and also ,I try compiled libarchive , proved ...
0
votes
2answers
998 views

Estimate compressed file size in tar.gz

I've got a set of .tar.gz files, which are duplicity backup files (either full backups or incremental ones). I'd like to compute which directories take the most space on backups. This will most ...
0
votes
1answer
2k views

linux zip and tar all files with a specific extenstion recursively maintaining directory structure

Similar to this question and this question I'd like to make a single compressed tar file (files.tar.gz) that contains all the php files in my webroot and all it's subdirectories, maintaining folder ...