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

learn more… | top users | synonyms

0
votes
1answer
26 views

How to issue a tar command when you restore your system

I've recently created a tarball backup of my Ubuntu system (/ and /home partitions both ext4). When I was creating a backup I booted off Live DVD and I used a tar command. Now I wonder which would be ...
-1
votes
2answers
21 views

How to create a tar of directory structure

I want to copy the directories into another server; however don't need to copy the files of the directories. So a tar of empty directories is the one that I am looking for.
0
votes
1answer
27 views

“a” showing up with files during tar archiving

While I'm archiving the file in my local system, I see an "a" at the beginning of the files while compressing. tar -zcvf database.tgz database/ a database a database/GeoIP2-City.mmdb a ...
2
votes
3answers
217 views

AIX tar error: There is not enough memory available now

I have an AIX P720 server running AIX 5.3. When running tar -xvf /dev/rmt0 extracting from tape (IBM TS3100 Tape Library), I get the following error: "There is not enough memory available now". It ...
1
vote
0answers
17 views

Tar waiting a long time at end of block device

I had some trouble getting Linux installed to a particular netbook and had to restart it from scratch multiple times. Re-typing the same commands to set up networking and bootstrap the install was ...
0
votes
1answer
28 views

How to “Find” then “Rsync” then “Tar/gz” on destination host?

I have a Cassandra node with snapshots broken up into 64 directories with over 350 files per directory. I want to "find" all snapshot files, preserve their location, rsync them across to a host with ...
1
vote
0answers
23 views

How to 'snapshot' a chroot?

I want to perform something similar to a 'clone' on vmware fusion/virtualbox/a VM manager. Host and chroot are both ubuntu. One complicating factor may be that this chroot may have one or more child ...
0
votes
0answers
29 views

How to make tar to ignore last-modified-time of files/directories

I'm using tar to backup a directory. Some files/directories' last-modified-time will be updated but the content remains. I would like to get a tarball with the binary if the directory files' content ...
0
votes
2answers
23 views

Does the untarred folder overwrites or appends the contents of the original folder? [duplicate]

I have a x.tar.gz as a backup which has the following contents: .htaccess a.html b.html c.html x.html I have also a ./x directory, already existing, which has the following contents: .htaccess ...
0
votes
1answer
23 views

Not able to see the backed up file in the backed up media

I used 2 commands cpio and tar to perform the same operation of backing up data to an external drive which is my 8Gb pen drive (sandisk brand). At the time of executing the commands, it outputs ...
6
votes
3answers
435 views

tar extraction also automatically decompresses

When I run tar -cvzf archive.tgz file1 file2 ; rm file1 file2 it normally creates a compressed tarball, but how is it possible that tar -xvf archive.tgz gives me back the uncompressed files? ...
0
votes
2answers
59 views

tar “--exclude-from” double star wildcard

I wrote a backup script on my Debian 8 system which uses tar command with "--exclude-from" to exclude some files/dir. This works great, but today I would like to exclude some files sharing the same ...
0
votes
1answer
25 views

Compress mtdblock with 'tar' before sending it via TFTP

what is proper command compress mtdblock with 'tar' before sending it via TFTP? tftp -l /dev/mtdblock3 -p 192.168.100.40
0
votes
1answer
33 views

Tar files in order

I am taring files using this script tar -cvf test.tar -C /home/user/Desktop/filestoTar File_one zap_file tar -rvf test.tar -C /home/user/Downloads/test Auto_file rocket_file And I want to untar ...
1
vote
4answers
69 views

Avoid the contents of a .tar begin with './'

I want to make a backup of a directory using tar and xz, but I have a problem. When I open the file, all the files and directories begin with ./ and I don't want this to happen. file.tar.xz |---- ...
3
votes
1answer
199 views

“invalid tar magic” on OpenWRT

I'm trying to install JavaSE on a OpenWrt (Pandorabox) device. When I run tar -xvf ejdk-8u65-linux-arm-sflt.tar.gz I get tar: invalid tar magic. How can I solve this problem?
1
vote
2answers
53 views

Can I download tar.gz file while it is being compressed?

I am compressing a huge directory which could be more than 10 GB, It takes time to compress it. But at the same time, I have to download this to another new server. So while the compressing is going ...
3
votes
1answer
37 views

Rsync contents of tar with remote server

I've got a number of backups as tar archives, and to do checking/testing of them I restore to some test machines using: cat archive.tar.gz | ssh server2 "cd /path/to/dir; tar zxvf -" Most of the ...
0
votes
0answers
24 views

Unix -untar files only looping one time - C-shell

I have list of *.tar.gz files that I want to unzip and untar at once. The code: foreach summ (`ls *.tar.gz`) gunzip -d < $summ | tar xf - end But only one file has been untarred. How would ...
0
votes
1answer
28 views

Thunar custom action: Extraction to subdirectories

I am attempting to create a Custom Action in Thunar (File Manager) that will extract a gzip archive into a subdirectory of the same name (e.g. abc.tar.gz to abc/). I created this command, which works, ...
0
votes
1answer
40 views

how to make TAR of selected files in directories

I have below paths in my system /a/b/z /c/d/ /e/f/z /y/g/ In "z" directory there are some files i just want to make tar of that files without going into directory .
1
vote
0answers
22 views

Archive for root file system with quick random access

I need file archive format with the following features It is compressed (not plain tar or iso). It can backup (and restore) linux root file system keeping owners, symlinks, sparse files, devices, ...
2
votes
1answer
57 views

passing variables from 'ls' to 'tar' via 'xargs'

I am trying to do something like ls -t | head -n 3 | xargs -I {} tar -cf t.tar {} to archive the 3 last modified files but it ends up running the tar command separately for each of the files and at ...
0
votes
1answer
26 views

How to recover a node/content from a tarfile that's been overwritten

Disclaimer: I'm not very good at writing questions, and mine is a very specific scenario. So I'm just going to jump straight into the situation: I was browsing my filesystem, and somehow managed to ...
0
votes
1answer
37 views

filename.gz installation on AIX

I use sudo tar xvzf forwarder.tar -C /opt/ on Linux and this works perfectly then I proceed with a . /splunk start to install a forwarder file. While in AIX, its forwarder is in .gz format and ...
0
votes
1answer
344 views

why would you tar a zip file

I see here that a tar is used to merge several files into one. So why do I see so often one zip file in a tar? example : archive.zip.tar
0
votes
2answers
63 views

Tar big files in different directories

I have ~20 files, each about 10 GB in size, in different folders that I need to compress into a single tar. It is not practical to copy them all to one location. More precisely, the files are ...
2
votes
2answers
63 views

How can I check if a directory contains the same files of a TAR archive?

Let's say I have a folder Documents and a TAR file Documents.tar, how to check if the tar file contains the same files that are present in the directory? The more obvious solution to me would be to ...
33
votes
4answers
2k views

How to untar safely, without polluting the current directory in case of a tarbomb?

Respectable projects release tar archives that contain a single directory, for instance zyrgus-3.18.tar.gz contains a zyrgus-3.18 folder which in turn contains src, build, dist, etc. But some punk ...
3
votes
3answers
436 views

How do I pipe the output of tar through mv?

A previous question of mine asked how to pipe downloaded files through tar, now I would like to know how to pipe the output of tar through mv. See I have this command at the moment: wget -c ...
1
vote
1answer
67 views

How to convert tar.bz2 to .bz2?

I have a file with compression tar.bz2 , I would like to convert it to .bz2 . Is there a command that does this in one shot? I tried the below but no joy ! tar -xvjf US.tar.bz2 US bzip2: ...
1
vote
1answer
69 views

Incremental backup script (shared hosting)

Please consider I'm not sys admin so I have only limited experience with the tools involved, I know there are similar question but I cannot find anything that suit my needs. In a similar question ...
1
vote
2answers
96 views

How do I pipe the files downloaded with wget through tar?

I would like to pipe tarballs (.tar.gz files in this case) I download with GNU Wget (wget) through tar -xzf (to decompress them, if this is unclear) but I don't know how. I have tried: wget -q -O- ...
14
votes
2answers
587 views

Does parameter order matter with tar? [duplicate]

I am learning Linux. I was surprised to see that the parameter order seems to matter when making a tarball. tar -cfvz casual.tar.gz snapback.txt bucket.txt gives the error: tar: casual.tar.gz: ...
0
votes
1answer
49 views

Encrypting existing tar.gz archive

I know of a method to encrypt a tar.gz archive while creating it (not sure if it's a recommend one): tar -czvf /path/to/save/archive.tar.gz -C /path/to/archive . | openssl des3 -salt -k #PASSWORD# | ...
0
votes
0answers
39 views

repack of fix tar file (containing files with similar name) with unexpected EOF

I have tar file, which is a backup from my Android 5.0 phone. The issue is that I get an unexpected EOF error. I wish to repack it. There are also several files with the same name (but different size ...
4
votes
2answers
55 views

Resumable archive

I've a need to archive some big directory structures on an NFS server. They're not likely to be needed particularly soon, if ever - they're just being retained for policy reasons. To this end, I'm ...
1
vote
2answers
35 views

Is it necessary to transfer `tar` files through `rsync` in archive mode?

I have a bunch of tar files in my machine which I want to transfer to an external hard drive (EHD); they where created preserving permissions (using the -p flag). I plan to use rsync to copy them to ...
1
vote
1answer
33 views

`sudo tar` but own the resulting file

I want to put a bunch of files into an archive with tar. However, I don't have permission to access all of them, so I have to do sudo tar. However, now that root has run the tar, the resulting ...
2
votes
0answers
61 views

Backup using find and ssh to off-site server

I'm sure this has been been answered in bits and pieces on many sites, but somehow I can't seem to get this (as a whole) to work reliably. Scenario: I have a server that I would like to do ...
0
votes
2answers
48 views

I am trying for a tar call and getting the below error

I am trying to use tar and get the following error: $ tar --strip-components=1 xf /data/rvm-latest.tar.gz  tar: You must specify one of the `-Acdtrux' or `--test-label' options Try `tar --help' or ...
-1
votes
1answer
54 views

Linux backup a folder by each

I have a folder /home/software, with some sub folders /home/software/game /home/software/photo /home/software/ebook ... I want to create tar backup including the date for each sub-folder so I will ...
0
votes
1answer
43 views

How to recover a .tar backup

I've a .tar backup, when I try to extract using below command. tar -xvf backup.tar Nothing is extracting and no errors or warning Seems like its corrupted. Is there any way to recover the .tar ...
0
votes
1answer
231 views

bash: /usr/bin/find: Argument list too long

I have too many files in a folder. I just want my inodes to be get free as soon as possible,So I have tried with find ./EcoBackup/* -name '*.*' > FilesBackupName.txt bash: /usr/bin/find: Argument ...
1
vote
2answers
47 views

Remove Specific File From Tar Archival Process After the Process Starts

When tar-ing up large directories (ie. a home folder for a backup/OS reinstall), it is often okay to exclude certain large files such as multi-GB videos. However, due to the all-encompassing nature of ...
4
votes
2answers
48 views

Tar is currently reading a 2GB file, and I deleted its only link. How do I stop it from running for an eternity?

Some more information: I was backing up a large directory with tar, only there were a couple of large files there that I didn't expect. This connection is over the network and very slow, so simply ...
0
votes
1answer
30 views

Tar archive list in a bash script

I have a function bound to an alias for easy listing of archives. function list-tar-archive { if [ "X$1" != 'X' ]; then out=tar -tf $1 | awk -F/ '{if (NF<3) print }' echo ${out} fi } ...
0
votes
1answer
69 views

change tape on the fly script

I have to write 17 Tb to tape: ssh some_host 'tar -cz /' | dd bs=20b of=/dev/tape of course 17 Tb doesn't fit to one tape so I need automatically change it when "no room" error occurs. I have ...
0
votes
0answers
21 views

Extract tar archive ignoring the Archive file name in single command [duplicate]

I would like to extract a tar file archive.tar.gz into a directory /Users/guest/data without the creation of the archive directory in the data directory tar -xvf archive.tar.gz -C /Users/guest/data ...
16
votes
4answers
2k views

tar and its key letters: is it a bug or feature?

I am wondering to ask the difference of these two commands (i.e. only the order of their options are different): tar -zxvf foo.tar.gz tar -zfxv foo.tar.gz The first one ran perfectly but the ...