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

learn more… | top users | synonyms

0
votes
1answer
78 views

Unzipping a TAR file, causing an error

I am trying to unzip a .tar.gz file using tar xvzf, as hhaamu said in his answer to my other question about Installing GCC on SCO. When I type: bash-3.1$ tar xzf gcc-2.95.2pl1-dist.tar.gz tar: z: ...
2
votes
1answer
176 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
60 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
145 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 ...
4
votes
3answers
959 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, ...
3
votes
1answer
229 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 ...
4
votes
1answer
117 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 ...
2
votes
1answer
77 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
94 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 ...
1
vote
1answer
55 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 ...
0
votes
1answer
115 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
107 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?
16
votes
3answers
4k views

How to choose directory name during untarring

Say I have file named ugly_name.tar, which when extracted, becomes ugly_name directory. What command can I use such that the resulting directory name is pretty_name instead?
2
votes
1answer
116 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
498 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
3answers
329 views

Different count for compressed file listing vs directory listing

I was taking a backup of a folder, where I used the following command : sudo tar -zcvf www.tar.gz /var/www/ It successfully compressed, just for verifying the number of files in the compressed ...
1
vote
2answers
891 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
158 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 ...
3
votes
2answers
8k 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
91 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. ...
4
votes
3answers
9k views

How to copy between two remote hosts using tar piped into scp from remote server when behind a firewall?

I'd like to transfer a directory between two servers, but compress the directory on the remote host before transfer, and then uncompress to another host. I'm sure it's possible to pipe everything all ...
5
votes
1answer
59 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
78 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
100 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
98 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 ...
1
vote
2answers
2k 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 ...
9
votes
5answers
10k views

tar: Removing leading `/' from member names

root@server # tar fcz bkup.tar.gz /home/foo/ tar: Removing leading `/' from member names How can I solve this problem and keep the / on file names ?
0
votes
2answers
221 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 ...
4
votes
2answers
100 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
0answers
169 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. ...
1
vote
3answers
90 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
241 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
74 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 ...
0
votes
2answers
88 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 ...
-1
votes
2answers
74 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 ...
1
vote
0answers
99 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 ...
6
votes
4answers
2k views

howto inflate AND extract a .tar.bz2 using the 7-zip command line tool

I have a .tar.bz2 file that I want to be decompressed and extracted via the 7-zip commandline tool. So basically I'm looking for the equivalent of tar -xjf foo.tar.bz2 with 7-zip there is only the ...
3
votes
1answer
2k views

Compress a directory using tar/gz over SSH to local computer?

I'd like to essentially tar/gz a directory on a remote machine and save the file to my local computer without having to connect back into my local machine from the remote one. Is there a way to do ...
4
votes
1answer
155 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
472 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 ...
4
votes
2answers
577 views

Find recursively all archive files of diverse archive formats and search them for file name patterns

At best I would like to have a call like this: $searchtool /path/to/search/ -contained-file-name "*vacation*jpg" ... so that this tool does a recursive scan of the given path takes all files with ...
3
votes
4answers
521 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 ...
5
votes
3answers
1k 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
932 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
2answers
6k views

Wait for process to finish before going to the next line in shell script

I have a script I made to create a backup. I need to make sure the backup is ready before it runs the /home/ftp.sh command. How can I do so? I use CentOS 5.6 #!/bin/bash tar -Pcf ...
20
votes
6answers
28k views

tar --exclude doesn't exclude. Why?

I have this very simple line in a bash script which executes successfully (i.e. producing the _data.tar file), except that it doesn't exclude the sub-directories it is told exclude via the --exclude ...
1
vote
6answers
441 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
179 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
2answers
2k 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 ...
1
vote
1answer
494 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. ...