GNU tar creates and manipulates archives which are actually collections of many other files; the program provides users with an organized and systematic method for controlling a large amount of data.

learn more… | top users | synonyms

1
vote
1answer
709 views

Install Old Version of PHP on Centos 6

I am trying to install php 5.2.17 on a CentoOS machine. Having problems as I have only used yum in the past. I have the file downloaded and unpacked...not clear on how I need to ./configure before ...
4
votes
2answers
2k views

Compress every file in a directory into its own compressed file

How do I compress every file in a directory into its own tar whilst preserving the name for each file? i.e. file1.out file2.out --> file1.out.tar.gz file2.out.tar.gz
3
votes
2answers
369 views

tar specific number of file

I have a directory with 27K files, I would like to tar them into multiple INDEPENDENT tar files, each will have 5000 files and the last one, will obviously have 2K (27K is not dividable by 5). What ...
2
votes
1answer
163 views

How to remove a certain folder when tar zipping?

I want to remove a folder when I'm creating a tar.gz file as it's for a backup and it takes too much space and is not required I am using the following command; tar -cvzf ...
0
votes
1answer
111 views

Use tar to exclude one directory (but not another) that matches a pattern

I'm working on doing a pretty straightforward tar for a site, but there's a wrinkle. Here's the file structure of the site: ... files/ images/ images/visitors/ ... logs/ ... ...
2
votes
4answers
1k views

Linux - Bare Metal Restore from a Tar file

I make a backup of my Debian webserver on a daily basis. A full backup on Sunday, and differentials each other day of the week. The backup is made with Tar. I backup the whole system into the Tar ...
0
votes
2answers
264 views

Extract a selected file from a .tbz file

I am on CentOS server. I have to download a .tbz file every day which is of 3GB in size and then i have to extract it and use inner files for further process. There are 48 files in the .tbz extracted ...
3
votes
4answers
4k views

How to list the files on a tape with tar?

On a HP-UX OS I have a backup on a magnetic tape created from the SAM. Everywhere I read the instructions to list-verify the contents of the tape is to use the TAR program: #tar tvf ...
3
votes
2answers
341 views

How to tarball a directory without carrying over /path/to/folder?

Example command: $ tar -cvjf destination.tar.bz2 /path/to/folder/source I'd like the final destination.tar.bz2, when extracted, to not include a /path/to/folder/ file directory. It seems inefficient ...
2
votes
2answers
2k views

tar - Remove leading directory components on extraction

How can you extract only the target dir and not the complete dir tree? compress tar cf /var/www/site.tar /var/www_bak/site extract tar xf /var/www/site.tar -C /tmp This will produce: ...
1
vote
2answers
313 views

tar to tape and file with encryption

I am trying to encrypt our tape backups, using tar and openssl but also write to a local file, so far I have : tar --total -czp ./tmp ./home | tee /tmp/Archive.tar.gz | tee > /dev/nst0 I'm not ...
2
votes
2answers
425 views

Use wildcard in tar with -T option

I have a backup script that has this syntax "tar -czvf backup.tar.gz -T filelist" In this filelist, I'm listing folder to backup, but I also need to backup every file that has a given extension like ...
2
votes
3answers
803 views

encrypt tape files with openssl and tar

I am trying to add encryption to my current tape backup scripts by piping the output through openssl, at the moment I have : tar -czpvf /dev/nst0 /home /otherdir so adding openssl gives this : tar ...
3
votes
1answer
484 views

Does tarring up small files into one big tar file before writing them to tape increase the level of data loss when an error occurs?

I've been looking at our backups recently and noticed that the tape throughput is a lot lower when writing lots of small files, so was thinking of tarring those small files up into one big tar file ...
0
votes
3answers
996 views

zip does not work for big files

What is the best way to compress a file if it is more than 4 GB in size? I am using the following for last several months. mysqldump --all-databases | zip > mybackup.zip Today I am got an ...
1
vote
1answer
408 views

Why does tar -c dir | pigz > /mnt/nfs/dir.tgz use network, then cpu in cycles instead of both at once (with one bottlenecking)

I want to transfer a multi-terabyte directory to an nfs mounted directory most efficiently over a 1Gbit network (probably the limiting factor) 3 options - tar and compress in place, then copy copy, ...
1
vote
2answers
4k views

How to exclude files from TAR archive using regular expressions?

I have a simple question, yet I can't find or solve the answer. I want to make a tar archive, but I want to exclude some files from it using regular expression. Example of the file to exclude is ...
3
votes
1answer
134 views

verify integrity of encrypted tar

I'm using tar along with openssl to create encrypted tar archives of some large directories (about 30GB). What is the possibility of corruption in this process, and how would I verify that the ...
4
votes
3answers
3k views

How to convert a TAR file into an ISO file

I have a Linux TAR file that I would like to convert directly into an ISO. Is there a way to do this, preferably, without having to extract the contents of the file first? This would be similar to ...
1
vote
1answer
39 views

Tar: create new archive from filtered archive

I need to create a new tar archive from the filtered output of the original. I thought something like this might work: tar xvpf myarchive.tar --exclude=foo* | tar cvpf mynewarchive.tar but that ...
2
votes
3answers
257 views

Bandwidth-friendly backup strategy using tar?

We've used tar to backup and compress (gzip) selected directories on our file server with very good results until recently. Each and every one of our backups are stored on mirrored (RAID) harddrives ...
3
votes
1answer
191 views

Is there a quick way to get the very last file in a large TAR?

Let's assume I have a several gigabyte tar file, but I also happen to know that the very last file written to the archive is something important that I need. Since tar files are appended ...
0
votes
2answers
59 views

Update and synchronize servers

I have two servers.. One has websites running and other have backup of those websites.. I need to synchronize the servers every week such that the files that were updated or changed after the previous ...
0
votes
1answer
59 views

TAR + create the dir under specific location

I must to run the tar command only under /var/tmp in my Linux machine ( red-hat linux ) so I run the tar command. And directory "KIT" created under /var/tmp in place under /var/tmp/DIR/ What to ...
2
votes
1answer
527 views

How can you designate an arbitrary leading path when adding files to a tar?

Is it possible to set an arbitrary path within a tar archive to place files which may not exist on your original filesystem? This differs from the -C switch in that I may want to take a back up of ...
2
votes
0answers
218 views

Umlaut encoding: tar on Mac Lion

I have a tar archive created on an old Unixware machine using ISO8859-1 encoding. When I try to extract it under Macosx Lion, I experience a bit of weirdness with German umlauts. For instance: I open ...
4
votes
2answers
1k views

CentOS 5.6 Update Version Of Tar

I am running CentOS 5.6 and for some ungodly reason, the version of tar is from 2004, and not compatible with the node package manager (NPM). How in the world can I update it? Is there an additional ...
0
votes
2answers
368 views

CRC Failed, File is broken, using php system command to tar a directory

Can anybody see a problem with the below PHP code? Or have any ideas to troubleshoot a solution as to why whenever I download the backup file.tar.gz and try to open it using 7zip on windows... that I ...
1
vote
1answer
175 views

update tar archive in the relative directory

when I want to create a tar archive in a relative path, I can do this: tar cf archiveName.tar -C relative/path someDirectory but when I want to update the archive, this tar uf archiveName.tar -C ...
1
vote
2answers
601 views

Quick and Easy Backup of Remote Server?

I'm switching from a slower remote server to a faster one. (In a nutshell.) Everything seems to have been migrated properly, but just incase some things didn't get transferred properly, I'd like to ...
0
votes
1answer
372 views

Update default tar location (CENTOS) [closed]

Im not a linux admin by far but ive been playing with node lately... a package im trying to use wasnt happy with b/c tar and i found i was running tar (GNU tar) 1.15.1 i downloaded the new version to ...
7
votes
2answers
527 views

Can I throttle tar without ionice?

My tar command tar --remove-files -cvif 2011-08-02_14-05-09.tar 2011-08-02_14-05-09 Writes 80MB/s. That's beyond the capacity we can spare because MySQL starts queuing up writes and eventually we ...
1
vote
2answers
126 views

Compress streaming data before sending

The following is working as expected. Sending server: mysqldump db_name tbl_name -d | nc -l 1234 Receiving server: nc 10.10.10.114 1234 | mysql -uroot -proot@123 test When I am dumping to ...
0
votes
2answers
75 views

Compressing directories on server without ssh

Is there a way to compress directories on a server without ssh access? We are transferring many domains and there is no ssh available on the current server. We would like to secure copy the ...
1
vote
2answers
4k views

Check integrity of .tar.gz backup

If you backup your system and create a .tar.gz with thousands of files and directories, how do you easily check its integrity? (ie without having to decompress). It's good to keep backups, but it's ...
0
votes
3answers
120 views

Uncompressing gzip file

I have compressed a folder using following command: tar czvf arch.tar.gz dirname/ When I try to uncompress it using following command tar xvfz arch.tar.gz then it uncompress folder but contents ...
3
votes
2answers
762 views

tar incremental backup with --listed-incremental does not work for me (Linux, Ubuntu)

according to http://www.gnu.org/software/automake/manual/tar/Incremental-Dumps.html, i try to create incremental backups with tar and --listed-incremental on my Ubuntu, but the --listed-incremental ...
11
votes
2answers
26k views

Can I extract a specific folder using tar to another folder?

I am new to the world of Linux and seem to have run into a stumbling block. I know I can extract a specifc archive using the command tar xvfz archivename.tar.gz sampledir/ however how can I extract ...
0
votes
1answer
190 views

Can I extract a file or directory using the tar command and provide it a specific name I want it extracted as? [duplicate]

Possible Duplicate: Can I extract a specific folder using tar to another folder? I am new to world of Linux and would like to know if I can extract a specific file or directory by giving it ...
1
vote
2answers
869 views

What happens if you use the command tar tvf as opposed to tar tvfz?

I am new to the world of Linux and in the process of setting up a Linux environment. I stumbled across the tar command as I need to view the contents of a file prior to extracting it and by accident ...
1
vote
2answers
145 views

MySQL needed to download in order to compile from source?

I have Slackware 13.1 and due to some bugs on the current version of the MySQL it comes with, I have to upgrade it. Since Slackware does not have 5.5 and I am upgrading I have decided to go with ...
0
votes
2answers
313 views

tar too slow when file doesn't exist!

I have a gigantic list of files on a text files. This list is passed to tar, like this: cat list.txt | xargs tar rvf archive.tar --ignore-failed-read The problem is that some files that are on the ...
0
votes
1answer
652 views

Correct way of using the --remove-files option with TAR

What is the correct way to use the --remove-files option when using tar? Is it... tar -cfvj --remove-files archive.tar.bz2 archive/ Or... tar -cfvj archive.tar.bz2 archive/ --remove-files
1
vote
2answers
382 views

ssh tar copying - missing files

On copying directory "home" (from remote machine) to local machine using the following command: ssh root@remote.machine 'tar -cz -C /home/*' | tar -zxv The number of files after the transaction ...
0
votes
1answer
123 views

Backup to Tape using tar: How to add file details (time, date, size) to a TAR log?

What is the best way to make my tar log more informative? Cat'ing the log shows what was backed up, but tells nothing about the files last update or size. Eg: tar cvf /dev/st0 foo* > backup.log ...
5
votes
3answers
123 views

Returning A List Of Quoted Files Paths Using Find

I would like to create a tarball that contains files from a directory that have a ctime of less than 30 days. Most tutorials I have found have basically recommended doing something like this: tar cvf ...
2
votes
1answer
228 views

Tar “mode” flag is being ignored

I try to tar a file and set the permissions to 666 using the mode flag. But whatever permission I set, it is simply being ignored. Command: tar xvzf backup.tar.gz --mode=666 -C /home/user/ Till ...
1
vote
1answer
1k views

Create ZIP archive without storing permissions?

I am distributing packaged files in ZIP format. I use the following to create: zip -r distr.zip files/ When expanded on other UNIX system files preserve their permissions as they were when I packed ...
2
votes
2answers
794 views

Linux how to move a large file?

I had an ISO file that was over 4GB. When I tried to copy or move the file from my computer to a USB key, I remember getting some error about the file being too large for the operating system to ...
1
vote
2answers
253 views

Linux: How do I archive select file extensions in an unknown tree

What is the best way to archive select file extensions in an unknown tree. I cannot use exclude options in tar/gzip/rsync as it would be impossible to exclude all possible extension variations. ...