Tagged Questions

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

learn more… | top users | synonyms

1
vote
1answer
539 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
2answers
116 views

Remove folder structure from archive, ignore folder while archiving and fix error

I am trying to make a script to backup each of my plesk hosts to individual files, I am having two problems: I would like to remove the folder structure from archive, the tar is 3 folders deep I am ...
2
votes
1answer
148 views

tar: compress only the contents of a folder

I have to compress only the contents of the folder, not the folder with tar, there is any argument for that? I have search but I don't find anything. Example: mainfolder/ asd1 asd2 ...
5
votes
3answers
106 views

Unarchive file while reducing size of archive?

The dilemma: I have a 10GB archive and a 20GB harddrive. When I go to unzip / unarchive the file the harddrive fills up and the process fails. Question: On ubuntu server 12.04 / linux is there a way ...
4
votes
1answer
2k views

tar/bz2 compress a file removing uncompressed original

Is there any way to turn a directory called dir1 into dir1.tar.bz2 without keeping the original? I need to save space and want to compress some large files but don't have enough room to keep a ...
1
vote
3answers
2k views

extract single file from huge tgz file

I have a huge tar file (about 500G) and I wan't to extract just a single file from it. However, when I run tar -xvf file.tgz path/to/file it seems like it is still loading the whole contents into ...
1
vote
1answer
87 views

Specifying Disk Drive to Write Files?

After tar.gz'ing a 25 GB folder, I copied the file from my local machine to a remote server via scp. Once the file was transferred, I failed to extract the tar.gz due to: $ tar -zxvf dump.tar.gz ...
1
vote
0answers
83 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 ...
-2
votes
1answer
214 views

How to move a file of 250 GB to another server? [closed]

The hard disk of one of my servers is full, so I need to move a file away from it to make room. I have tried tar -cvf but when I send it to the other server using wget -c, I see it is 100% complete. ...
4
votes
2answers
448 views

How make a compressed tar when there are too many filenames for the shell to expand on a single line?

Normally I would just do something like: tar -czf archive.tar.gz *.csv But when there are too many files in the directory for the shell to expand on a single line this doesn't work. In these cases ...
3
votes
3answers
577 views

linux tar -T - does not work on the fly

I found some problem with linux gnu tar. wheh I use option -T - (for file list from stdin) or -T named_pipe_file , this desn't work on the fly. for example, simple interactive script: while ...
0
votes
1answer
245 views

How to batch extract from archive using tar to directories

I m trying to extract files contained within a directory in a tar.gz file. The extract I m using is tar zxvf foo.tar.gz. It extracts the files from the archive but removes them from the directory they ...
0
votes
1answer
158 views

How to keep daily tar.gz backup with less redundant data

Like most of you, I have a few daily tag.gz snapshot of a folder (of any application). There is only a few different each other but the tar.gz is not a diff/delta friendly format. Most data in the ...
0
votes
1answer
92 views

Tar archive wrong creation date

I have a script to backup some directories: tar cjf /backup-`date +\%m-\%d-\%Y`.tar.bz2 mydir >> /dev/null 2>&1 At the end of the process, a "ls -al" show something like: -rwxr-xr-x 1 ...
1
vote
4answers
192 views

Does archive size of tar, zip and rar effect the time it takes to delete a file from it?

Does it take a longer time to delete files from a large tar zip and rar archive than a smaller one? I would think that for a file to be deleted from an archive, all the data that exists after the ...
1
vote
2answers
230 views

Advanced backuping script

I'm currently writing an advanced starting script for my minecraft server. Everything works out as I want it too. But the problem is the backups. I created a function for it. It works also great and ...
2
votes
3answers
2k views

Copy hundreds of thousands files Mac to NAS

I'm trying to transfer my Aperture library to the NAS. It contains few hundred of thousands of files (quite small ones). After OS X finishes copying the big files, the estimated time of the copy ...
1
vote
6answers
769 views

How do I tar dot files but not dot directories

The following tar command will exclude all dot files and dot directories. tar -cvzf /media/bjackfly/bkup/bkup.gz --exclude '.*' --one-file-system /home/bjackfly In my case I want the dot files to ...
3
votes
3answers
376 views

Display deflation percentage of tar command (like zip command)

This question may sound weird but I would like to know if there is a possibility to display the deflation percentage of the files processed in the tar command. I use this command tar -cjvf ...
3
votes
6answers
2k views

How to extract tar.gz on windows xp

Can anyone suggest me ways to extract tar.gz file on windows xp ? Is there any built-in tool ? Or may be a script that can be written ? PS: Please note I can't install new software on my computer (do ...
0
votes
2answers
681 views

Tar - Remove Common Prefix When Creating Archive

I am attempting to tar up the contents of a root file system, located at $rootfs. The problem is, when I try to tar -c $rootfs > $dest, the directories between my current directory and the actual ...
1
vote
2answers
247 views

7zip is incompatible with tar format created by git archive

% git archive --format tar master > archive.tar % file archive.tar archive.tar: POSIX tar archive % tar cf a.tar archive.tar % file a.tar a.tar: POSIX tar archive (GNU) 7zip cannot unpack tar ...
1
vote
2answers
173 views

Backing up multiple vmware VMs from a mac

I use vmware fusion to prototype and model enterprise infrastructure. This question is intended to solicit an optimal method for backing up (preferably incrementally) VMs. My VM directory is now ...
0
votes
1answer
229 views

Ubuntu 13.04 Restore: How to untar 'full backup archive' and remove any changes later on?

Linux newbie here. I got a fresh template of Ubuntu 13.04 installed on my VPS and made a full system backup using TAR: sudo tar -cvpjf backup.tar.bz2 --exclude=/backup.tar.bz2 --exclude=/dev/* ...
0
votes
1answer
723 views

Creating a tar with a absolute path

tar -cf /Users/Files/myfile.tar /Users/Files/ I am basically trying to create a tar containing the contents of User/Files and create it in the folder of the contents. I can only execute this ...
-3
votes
1answer
267 views

Compress text file to tar.bz2 format on Ubuntu

How can I convert a sample.txt (uncompressed) file to sample.tar.bz2 format using Ubuntu 10.04 command shell?
1
vote
1answer
330 views

find files with spaces modified in last 60 days and tar.gz in files no bigger then 4gb with date

I maintain a file server. I need to backup files that have changed in a period of time. First i compressed up everything to 4gb files and backed up to dvd. But 7z that I was using 7z a -t7z ...
0
votes
2answers
942 views

tar piped to curl: This does not look like a tar archive

curl -L http://download.transmissionbt.com/files/transmission-2.80.tar.xz -s -o - | tar -xf - The error: tar: This does not look like a tar archive tar: Skipping to next header tar: Exiting with ...
2
votes
3answers
17k views

Install VLC 2.0.7 in CentOS 6.4?

I am keep failing in the installation process I have tried. I have started process as follows. yum install gcc dbus-glib-devel* lua-devel* libcddb wget ...
2
votes
2answers
452 views

One-liner Linux for scp'ing thousands of files as a tar

I have a folder with tens of thousands of files that I need to scp to another box. As doing one file at a time is very timeconsuming, and as I don't have harddrive space to make a compressed tar ...
0
votes
1answer
321 views

Tar of Linux Kernel corrupted error while untaring

I have downloaded two versions of Linux kernel 3.9.9 and 3.10 from kernel.org. When I am trying to untar this file I am getting this error Lzma library error: Corrupted input data . I am not ...
-1
votes
1answer
181 views

When I extract a tar file, all the files/folders have 777 permissions

I run Debian. I have a tar archive that, when extracted, assigns 777 permissions to all files/folders in it. I believe this has to do with the fact that I'm root, but is there a way to make it so they ...
0
votes
2answers
331 views

TAR or ZIP current directory excluding the generated file

I am trying to zip or tar all the files and subdirectories in current directory and save it to the file I am zipping. The problem is that -x shitch does not work - files are being zipped and saved to ...
1
vote
0answers
406 views

Can I fix this TAR+XZ file?

I'm doing some file recovery on an old hard drive, using the most recent stable PhotoRec. After finding a lot of files that I wanted to keep, I decided to make some of them (meaning over 700) easier ...
1
vote
2answers
106 views

How to extract such a compressed file?

I have been asked to extract a ZIP file having in it 3 tar files and each tar file contains around 3000 gz files. I had to extract the main ZIP file first then extract the tar files second then ...
0
votes
1answer
97 views

How to collect all media file in a mac directory structure?

I'm trying to copy all media files (Mac file type of Image or Movie) to the same directory structure, only taking media files. Is there a more efficient way than what I've got below? Is there a ...
-1
votes
2answers
183 views

Extracting a specific file from tar.tgz archive in windows 7

This has been asked several times but I can't seem to figure out the solution. I have a tar.tgz archive which has .txt files in it. I need to extract a specific file t1.txt from it programatically ...
1
vote
1answer
47 views

What does GNU tar “--restrict” option actually restrict?

The manual of GNU tar only states that --restrict: --restrict disable use of some potentially harmful options Can anyone elaborate on what are these "harmful" options? I could not ...
1
vote
0answers
115 views

Permissions tar extraction to nfs share from a Perl script

As part of an installation procedure of a piece of software, I use: curl -s <url-to-targz> | tar -p -x -z -C / inside a Perl script (I use qx($command) or system($command), either will ...
0
votes
2answers
114 views

Is it possible to tar two different files at the same time?

I need to tar two different directories at the same time. Is it possible to execute two instances of tar in parallel?
0
votes
3answers
172 views

Untar multiple files at once?

I'm on Windows 7 and have a number of .tar files with the following names: .tar-aa .tar-bb .tar-cc ... The tar files contain a large backup directory which is broken up into chunks of 250MBs each. ...
1
vote
1answer
98 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 ...
3
votes
2answers
1k 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
2answers
1k views

How to open big tar.gz file

I created a big tar.gz file, following this guide. It is a daily backup file. My computer has 3 GB of RAM and is running Windows 7. My biggest archive is 183 GB, containing pictures and documents. ...
1
vote
1answer
160 views

extracting tar files split over multiple dvd's

If I have a bziped tar file split over multiple dvd's what's the best way of extracting it without creating a lot of intermediate files? I don't want to first copy all the archive parts to an ...
1
vote
2answers
992 views

Create a tarball with a fake `root`

I'm working on something in a Makefile that will look something like this: tarball: mkdir -p tmp/tarball/etc/service mkdir -p tmp/tarball/usr/local mkdir -p ...
1
vote
3answers
2k views

Prepend prefix in tar

I currently do in a shellscript very inefficiently: cp -a $MYPATH /tmp/$VERSION cd /tmp tar cjf archive.tar.bz2 $VERSION I want everything to be contained in the directory called $VERSION - is ...
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
205 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
516 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 ...