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

learn more… | top users | synonyms

1
vote
2answers
18 views

Include subdirectory from excluded directory in a tar archive

I have the root folder USA and sub-folders California and Texas. Texas is an excluded sub-folder but it has a specific file in it that I'd like to include in the tar backup. Let's call this file ...
1
vote
0answers
31 views

untar error - Cannot change mode to rwxr-sr-x

I am trying to untar a .gz file , which is stored in the /root folder onto a directory in /mnt/flash2/example I use the following command - tar xzf filename.gz --no-same-owner -C /mnt/flash2/example ...
1
vote
1answer
52 views

Copy a rolling “last 2 months” of files

I have a friend who is a photographer and she has a lot of large files as a result. Our current solution is where some files are delivered to my house. I don't have the storage capability to store all ...
1
vote
0answers
40 views

tar --occurrence= option ignored?

Using GNU tar 1.26 on Linux, I'm looking for a way to stop processing after the N-th occurrence of a file in a .tar archive. This should work: tar --file=archive.tar --list --occurrence=1 filename ...
1
vote
1answer
69 views

Lynx is trying to unzip my downloads

I am having a problem with the Lynx text browser. When I try to download a some tar.gz files, Lynx is not downloading it. It is putting it in a tmp directory and then trying to unpack it with the ...
1
vote
0answers
650 views

linux tar listed-incremental untrustworthy

I'm looking for some way to troubleshoot incremental backups with tar on linux. I've got huge datasets (about 3TB) that need backing up to tape. For this I use the linux tar command and mt / mtx on ...
1
vote
0answers
144 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 ...
1
vote
0answers
225 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. ...
0
votes
4answers
2k views

Copy a directory to external HDD

I'm trying to copy a directory to external HDD. I mounted the device and then typed : cd root tar -cf - * | (cd /mnt ; tar -xpf -) I got this error message: "cowardly refusing to create an empty ...
0
votes
2answers
86 views

How do you set the default behavior of tar?

I have never needed to use any other options for tar other than -cvzpf. Is there some way to set that as the default behavior? While I recognize that it is often impossible to say why someone wrote a ...
0
votes
3answers
619 views

How do you view a sql.gz file as plain text SQL from the command line?

How do you view a sql.gz file as plain text SQL from the command line? I want to read the SQL statements stored in a .sql.gz file, from the command line on the server. I've tried tar -xzvf, but get ...
0
votes
2answers
61 views

How to determine where a tarball expanded

I ran the following on Redhat linux: tar zxvf jdk-7u79-linux-x64.tar.gz resulting in: jdk1.7.0_79/ jdk1.7.0_79/LICENSE jdk1.7.0_79/release jdk1.7.0_79/jre/ jdk1.7.0_79/jre/LICENSE ...
0
votes
2answers
254 views

tgz file give invalid compressed data--format violated [closed]

I have download this file http://download.icu-project.org/files/icu4c/55.1/icu4c-55_1-HPUX11iv3-aCC.tgz https://ssl.icu-project.org/files/icu4c/55.1/icu4c-bin-55_1.md5 md5sum ok But on linux and ...
0
votes
2answers
84 views

difference between gnu tar and tar package in fedora repositories

man page of tar in fedora (and also man page of tar on die.net) mentions the --acls and --xattrs and --selinux options but they are not mentioned in tar manual in GNU website Why? do this mean ...
0
votes
1answer
62 views

tar with -C not working [duplicate]

I am trying to un-tar into a different directory using this tar xvf BACKUP.tar -C test But I am getting the following errors File -C not present in the archive. File test not present in the ...
0
votes
2answers
62 views

Is it possible to list all files in a *.tar.gz file without scanning it's whole contents?

I know this way only: tar --full-time -tvf /path/to/file.tar.gz But it makes tar to scan all the archive and it is time consuming if it is a very big one. My question is maybe there is a way to ...
0
votes
3answers
1k views

In the command tar –cvjf foo.tbz a b c, what are a, b, and c?

I know these aren't extra flags to be passed to the tar command, aren't they just files names to be added to the archive?
0
votes
2answers
85 views

untar specific file to present date in linux [closed]

I am using Centos and I am installing one Debian application with multiple-instance. I have created 3 multiple-instance successfully and it is running good. Because of Debian application, the ...
0
votes
1answer
4k views

Encrypting and compressing

Is there a better way to compress and then encrypt files other than tar followed by openssl or gpg?
0
votes
4answers
1k views

Why does this shell script fail in bash, but the commands work in SSH?

I'll first admit to being quite the noob in Linux/SSH/etc. What I'm trying to write is a shell script that will back up a website and all the MySQL DBs that support it. I found examples all over the ...
0
votes
1answer
902 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 ...
0
votes
2answers
580 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 ...
0
votes
3answers
26 views

How to delete files from a directory based on the contents of a gzipped tar file?

Given that I: have a directory that contains over 1000 files have a gzip'ed tar file that contains a subset of those files (x.tgz) What is the single command line (if it is possible) that will ...
0
votes
2answers
96 views

how to untar file in linux red hat?

I am compiling linux red hat stable kernel on red hat linux and the error which I am facing is as below
0
votes
1answer
27 views

By convention, where do packages go to install on other machines?

I'm working on a script that will scp a tarball to another machine and extract and install it's contents via ssh. I have to install this script as one bash file and one tarball. I could install the ...
0
votes
1answer
28 views

How to archive files and not entire path

I'm trying to archive specific files on diferent folders. I use this bash command: tar cf file.tar /home/albertserres/Descargas/file Inside the .tar file i have a folder named home inside another ...
0
votes
1answer
377 views

TAR gives error - tar: You may not specify more than one `-Acdtrux' or `--test-label' option

I am trying to make a tar ball and its throwing the error, persis1@takwa228-DEV $ tar -pcrvzf ALPHA.tar.gz https-ALPHA tar: You may not specify more than one `-Acdtrux' or `--test-label' option Try ...
0
votes
1answer
117 views

How to show a progress bar while tar a folder recursively?

In bash-script execution of taring not shown a progress bar, how to show a progress bar while taring a directory?
0
votes
1answer
71 views

Tar Create and Split files into subdir

I have this command: tar -cf - input/* | split --bytes=1m Which splits my huge gz files into small ones. This works fine. However I want the output (the small files) to be created in the input/ ...
0
votes
1answer
386 views

tar command not found on rhel6

I am trying to download a file in rhel6 and use tar to uncompress it. I am running this on docker. I get a wierd error saying : /bin/sh: tar: command not found 2014/12/22 19:32:21 The command ...
0
votes
1answer
118 views

Scripting multi-volume (GNU) `tar` with pre-defined number of volumes

I've wrote me a little script to test (or extract) a very big multi-volume tar archive (note: created with GNU tar), each of which 00x.tar chunk will fit onto a standard DVD: #!/bin/bash d=$(dirname ...
0
votes
1answer
62 views

Extracting tar.gz from distance

I would like to extract a single file from a tar.gz file, but its in another folder than I am currently in. Is it possible to extract from "distance"?
0
votes
1answer
337 views

“tar (child): Cannot connect to https: resolve failed” when installing Bitmask

I am trying to install Bitmask on my system to get the riseup VPN running(https://help.riseup.net/en/vpn/how-to/linux), but as you can see, there are no packages for Fedora. I tried the compressed ...
0
votes
2answers
81 views

Find an archive and extract it in the directory where it is located

I want to find a tar file which is presented in any directory and un-archive it in a one line command. I am able to find it separately from home directory. but only can extract it from directory ...
0
votes
1answer
71 views

restore from tar file

I took a backup using: cd /usr/CCS tar cvfz /usr/LARGE/BKUP/hms.tar.gz * Now I would like to restore HMS and overwrite at /usr/CCS/HMS. HMS is one of the subfolders under /usr/CCS Can I get some ...
0
votes
1answer
53 views

Is it possible to have total no. of blocks taken by same files be different on two PCs? [closed]

I used ls -l mysoftware/ on two different machines, each running ubuntu 12.04. But the 'total' returned by this command is different on the two machines. On one machine it is printing 6, and on ...
0
votes
2answers
340 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 ...
0
votes
2answers
179 views

Can tar archiver zerofill a file?

I have received a tar archive from a co-worker and after decompresing I found that some text files are corrupted. More precisely they are filled with zeros. They have correct size but all bytes are ...
0
votes
1answer
614 views

Proper way to join multi-volume tarballs?

So how should this be done? I have learned that using cat is the preferred way when using split to create multi-volume files, but what about when using tar's own native multi-volume function? Thanks
0
votes
1answer
127 views

Locate a directory within an archive

I have .tgz archive i'm trying to locate a directory within it to extra how do i search within a .tgz i tried the following below but no luck. tar -tzf archive-9.tgz | grep '161519' | xargs tar -Oxzf ...
0
votes
1answer
20 views

Set LZMA compression level via tar [duplicate]

How can I set the compression level for this command? tar --lzma -cf files/compressed/lzma/archive.lzma -C files/original/ . With --bzip I just use: BZIP2=-9 tar --bzip2 -cf ...
0
votes
1answer
60 views

Can I use lzma compression, without using “tar”, on OSX 10.10.3?

I kind of think of OSX as Unix by another name. But, if I need to move this to the Apple forum, please tell me! I can create tar files compressed using lzma as such: $ ls ./DbDumps alpha.dmp ...
0
votes
1answer
50 views

tar exclude files *.zip

Why don't *.zip patterns work in tar : tar cfjv backup.tar.bz2 --exclude mydir/files/*.zip mydir Is there another syntax?
0
votes
1answer
16 views

How do I test for existence of a file(s) within a certain directory before making a Tar of that directory?

How do I test for existence of a file(s) within a certain directory before making a Tar of that directory? Would it possibly look like this: if [ -f /home/backup ]; then tar cf name.tar; fi
0
votes
1answer
341 views

Unarchiving a downloaded tarball with Ansible

I'm trying to get WordPress downloaded and installed via Ansible and I can't seem to figure out what I'm doing wrong here. First I download via the get_url module then I attempt to use the unarchive ...
0
votes
1answer
78 views

tar unused files then delete them

I have folder with subfolders and sessions logs. I need some commands or script to tar this folder without usage files and then delete it. I have this construction, but I'm not sure if this leave ...
0
votes
3answers
71 views

what the best approach in order to compress directory with Hundreds of sub directories [closed]

Under /usr/cti/APP_sys, I have hundreds of directories and subdirectories and files, etc. I wonder what the best approach in order to compress the /usr/cti/APP_sys directory (get the best low ...
0
votes
1answer
47 views

Store restored files and directories in a separate directory

I have backup files in the form backup-date.tar and these files will be in a directory called backup. I am performing a restore by using tar -xvf backup-date.tar but the restored file is placed in the ...
0
votes
1answer
47 views

tar delete progress question

I was trying to use tar command , --delete option and met some problems. There are two things I don't understand: when using --verbose option with combination of --delete option, nothing shows as ...
0
votes
2answers
266 views

tar + how to extract from /var/tmp in order to place the directories under /

I work with solaris 9 machine In order to extract the list.tar file I need to change directory to / And from there I do: tar -xvf list.tar Example Cd / tar -xvf list.tar x ...