The tar archive format and/or the command-line utility for working with tar files.

learn more… | top users | synonyms

2
votes
1answer
726 views

How to compare two tar archives (including file content, new/removed files, symlinks)?

I have two tar archives (compressed or not compressed), and I want to find all differences in the two archives. Both archives contain a complete file system (i.e. when unpacked, would generate ...
1
vote
1answer
122 views

How to see tar content including uid and gid?

I have a tar archive and want to see the content with the group-ids and user-ids. When using tar --list -v --file file.tar I see the user and group names, but I want to see the user-ids and ...
3
votes
2answers
471 views

how to include or add /dev with tar --one-file-system

I'm running tar on a complete remote filesystem using ssh -n <hostname> 'sudo tar -cpvzf - --one-file-system /' | cat > Bak.tar.gz This gave me a tarball. I tried importing this tarball ...
0
votes
1answer
529 views

How to check whether my cron job for backup using tar was succesfull [closed]

I have a cron job to tar backup websites and databases and upload the backup to a NAS. Instead of checking the tar files on the NAS. Is there any way to check if the tar backup process completed ...
3
votes
1answer
2k views

Extract single file from tar to other folder

I've searched for multiple forums for this questions and have seen different answers but so far, nothing have worked yet even from the ones I've seen here. I want to extract a single file from a tar ...
2
votes
1answer
201 views

tar and if-statement

I have a script that check if a file exist inside a tar file but something's wrong because it always go to the else part of the script. I am pretty sure that it shouldn't be that way. The date is in ...
5
votes
1answer
138 views

How do I hook into Tar with BASH?

Long Story Short I'm working with Tar archives that contain PNG images in base64 encoding. I would like to use BASH (or whatever else works) to hook into the extraction function of Tar to decode PNG ...
0
votes
1answer
275 views

Extract a single file from a tar file and put it to another directory [duplicate]

I need to extract a single file from a tar file to another directory. So far I have this: This one extracts a single file to same directory: tar -xvf filename.tar ./file.txt I tried this but it's ...
4
votes
1answer
140 views

What is the difference between a tar of a complete filesystem and an image?

I can create an image of a filesystem, or I can create a tar-file containing all of it. Is an image therefore something like a tar-archive? Or do these two types differ in more ways?
5
votes
1answer
103 views

How to uninstall applications that were installed using tar command

Can anyone explain me how to uninstall the applications that are installed by extracting using tar command (tar files) . I am really struggling to find an uninstall file . Surprisingly, I dont't find ...
2
votes
1answer
422 views

Tar ignore or fix checksum

I have a archive backup.tar that was created with a nonstandard program a long time ago. I no longer have access to the original program. The archive is Not compressed (gzip). When trying to extract ...
3
votes
2answers
2k views

Search for a file inside a tar.gz file without extracting it and copy the result to another folder

I need to search for a file inside a tar.gz file without extracting it. After that, I need to copy the file that was searched (if ever there is) to another folder. So far I have this, but the copy ...
3
votes
2answers
4k views

How to make tar save the archive on a remote machine using sftp or ftp?

I would like to backup some of my very important data on a remote machine. Currently I'm just saving it to my local machine by using this command: tar -cvjf ~/backups/Backup.tar.bz2 ~/importantfiles/* ...
1
vote
2answers
276 views

Extract TAR to SD-Card and verify contents afterwards

We currently extract a TAR archive to a SD-Card like this tar xf ${ROOT}/rootfs.tar -C /cynox/${DRIVE}/${TARGET} As a side note: The rootfs.tar contains files for an embedded Linux system. Some of ...
1
vote
1answer
58 views

Portable software for the Posix world

Is there any "portable" software for Linux (i.e., Ones that can just be un-tar'd and used, instead of in rpm, or similar format. to be used in conjunction with a package manager)? Also, are there any ...
19
votes
2answers
72k views

Can I zip an entire folder using gzip?

I'm trying to zip a folder in unix. Can that be done using the gzip command?
2
votes
1answer
139 views

recover partially overwritten tape from tar -c

I have a situation. I was supposed to run tar -x to recover a tar file from a tape but I pressed "c" and forgot to put the tape on readonly. The file was on fsf position 23, but the tape had 27 files. ...
5
votes
1answer
73 views

tar '-u' operation

When adding an updated version of a file to a tar file using '-u', and looking at the tar file with '-t', I notice that a newer version gets added to the end (the tar file also increases in size); ...
2
votes
1answer
119 views

What characters TAR doesn't like?

I keep a list of photos burned to dvds for incremental backups but I got into a strange situation where a file was already burned into a dvd but tar keeps saying it's not. Here the steps to reproduce: ...
1
vote
1answer
171 views

Error handling with tar and keep-old-files option

I am unpacking tar files with the option --keep-old-files so that I don't clobber files that are already there. The annoying thing is that this causes tar to produce an error code #2 (fatal error) ...
0
votes
2answers
131 views

Installer packages: .bin, -rpm.bin, tar, tar.z

Is it correct that most of Unix&Linux software supports x-copy deployment? If I download the installation package and uncompress the files into a particular directory - would that be enough to ...
2
votes
2answers
3k views

tar: short read

I get an error when I uncompress my tar. I do this: tar xvf VM_DECOMPTES.tar and after some time I get the following error: tar: short read What is going wrong here? tar: unrecognized ...
0
votes
2answers
367 views

Is it safe to assume the tar.gz file is healthy?

I have a rather large tar.gz file (17GB) which is a tar.gz version of a directory. The problem here is I got the following message after the tar operation. tar: Error exit delayed from previous ...
1
vote
3answers
138 views

Taking Backup of files of particular limit in unix

Here is the scenario, I have 1000 files in a folder each ~3 MB. I want to zip all files into 50MB each zip and remove the original files. NOTE: 50MB may contain 20 files or 10 files but that zip ...
1
vote
4answers
561 views

tar a specific number of files listed in a text file

I have a text file which contains a list of files. I use. tar --null --no-recursion -uf abc.tar --directory= /tmp/temp --files-from abc.txt This command simply creates a tar with all the files ...
-3
votes
1answer
92 views

Is there a way to tar multiple files in a directory (Linux/Unix)?

Is there a fairly simple way to tar several (specific) files in a directory? For example let's say the following is a directory: -rw-r--r-- 1 allend bin 98 Jul 20 15:50 scriptlog.log -rw-r--r-- 1 ...
-1
votes
2answers
83 views

What's wrong with this tar command? [closed]

find /informatica/dev/SrcFiles* -mtime +7 -and -size +1M -exec tar -rvf files.8.2.2013.tar {} \; This command is running/working correctly and I'm not sure whats wrong. I want to find the files that ...
0
votes
2answers
112 views

find command and tar

find /informatica/dev/SrcFiles* -mtime +7 -and -size +1M -exec tar -cvjf> So I ran this command and I can't find the file after it was done running (probably because I never named it?). The ...
5
votes
2answers
1k views

How to download an archive and extract it without saving the archive to disk?

I'd like to download, and extract an archive under a given directory. Here is how I've been doing it so far: wget http://downloads.mysql.com/source/dbt2-0.37.50.3.tar.gz tar zxf dbt2-0.37.50.3.tar.gz ...
1
vote
0answers
122 views

Disk partition emptied during tar backup

This morning I was doing a routine backup of my development drive, one of 4 primary partitions on my hard-drive. The script I ran was: filename="/home/Backups/Devi_"`eval date +%Y%m%d`".tgz" touch ...
7
votes
3answers
2k views

creating archive using tar including all 'dotfiles' but excluding all subdirectories and /wo directory structure

I want to backup all the 'dotfiles' (f.e. .zshrc) under my home directory with tar, but excluding the directory structure and all subdirectories. I've tried it several times with different commands, ...
4
votes
1answer
216 views

GNU `tar` runs `stat` on an excluded directory. Is it normal?

I'm running tar as root like this: cd / tar --create \ --verify \ --exclude-backups \ --exclude-caches \ --auto-compress ...
2
votes
2answers
1k views

Verifying a .tar.gz backup

Edit 3: For people who will read this question: --verify mysteriously fails with "Warning: Cannot seek: Illegal seek", hence I recommend you look for alternative ways to verify your archives. My ...
3
votes
4answers
956 views

Why is my tar file bigger than the directory backed up

This question did not help me (despite having the same title). So I post this even though this is a duplicate question. As far as I can tell, the total in du -k includes all the subdirectories and ...
6
votes
3answers
4k views

Efficiently remove file(s) from large .tgz

Assume i have an gzip compressed tar-ball compressedArchive.tgz (+100 files, totaling +5gb). What would be the fastest way to remove all entries matching a given filename pattern for example ...
1
vote
2answers
2k views

Create .tar.gz from a directory omitting some subdirectories and add only new or changed files

I need to create a script, maybe bash, maybe just a .sh that checks for files changes on a root directory and sub-directories of the root, and adds to a new file. The tar.gz file name should have the ...
1
vote
0answers
190 views

How to do incremental backup of .img files containing windows partition?

On an OVS I have a few windows machines. I want to create a full backup their .img disk files, thats done, .img.gz. Than I want to incrementally backup their C:/ partition, but thats not working. ...
4
votes
2answers
113 views

Where can I find updated TAR.rpm for Oracle VM Server?

I'm using tar for my incremental backup script on Oracle VM Server 3.2.2 and it comes with tar 1.15.1 I need this command: tar -cf drive-C.full.tar --no-check-device \ ...
1
vote
6answers
952 views

How to avoid overwriting existing files while using tar command?

The tar command just overwrote my file an hour ago while I was trying to make a tar to backup it. I ran tar zcvf foo.tex foo.bib and after that my tex source file lost. What's worse, this is the ...
1
vote
2answers
288 views

Why is my tar file bigger than its contents?

I have a tar file that I have recreated from two files - xaa, xab (the results of using the split command). The tar file is the size I expect it to be but when I extract it the folder I get is a ...
2
votes
1answer
1k views

Ignore Symlinks when Extracting Tarball

I have a relatively simple question that I cannot seem to find the answer for. I am attempting to extract a tarball (*.tgz, to be exact) and receiving terminal errors on extracted symlinks. ...
-1
votes
1answer
50 views

What are the relative merits of the various standard Unix archival utilities? [closed]

There are many archival tools for Unix, with varying degrees of availability. To make matters more confusing, many of them can write each other's formats. I am seeking more information on their ...
3
votes
1answer
218 views

How can I copy a file between server using bsdtar?

I'm looking for the fastest way of copying a file between 2 linux servers using bsdtar. With normal tar, I would do something like: ssh root@remote 'tar -cz -C /my/path/ big_file.txt' | tar -zxv ...
2
votes
2answers
5k views

How to install tar file (jhead) on Mac or Linux machine

I'm new to Linux and tar balls and was wondering how to properly install them on a Mac or Linux machine. I would prefer to know how to install on a mac but I just need some help understanding them. I ...
9
votes
3answers
1k views

Universal extractors

With an increasing number of archive/compression file formats, is there a single free/open-source command line tool to rule them all? Perhaps something with a consistent / unified set of flags? (note ...
7
votes
1answer
1k views

Under what circumstances does gunzip & tar xf work but tar xzf fail?

To illustrate the point: I have downloaded the LEDA library from the company's website. Using tar -xzf on it fails: $ tar -xzf LEDA-6.3-free-fedora-core-8-64-g++-4.1.2-mt.tar.gz tar: This does not ...
2
votes
2answers
3k views

How to scp/tar files that are in between specific days?

I need to copy db log files between two suse servers where I am interested in files ONLY in between 10.3.2013 - 13.3.2013 It is desired to compress the files before copying so I tar them and scp. ...
1
vote
1answer
791 views

Difference between --xz and --lzma in GNU tar?

As far as I can tell, XZ is a container that uses the LZMA2 algorithm (i.e. extended LZMA); but e.g. $ xz foo/ complains about foo/ being a directory. So presumably the correct way to preserve ...
3
votes
8answers
2k views

Triple compression and I only save 1% in space?

I've been trying to save space on my linux server, and I had a folder containting, in subfolders, 22GB of images. So I decided to compress them. First I used tar: tar -zcf folder.tar folder Then ...
2
votes
1answer
84 views

Do tar archives include user/group name by default?

In tar's man page I stumbled upon two options: --numeric-owner: always use numbers for user/group names --owner=NAME: force NAME as owner for added files This made me wonder: When I tar ...