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

learn more… | top users | synonyms

0
votes
1answer
23 views

Backing up Linux server to Windows domain

I'm maintaining a small Linux workstation/server in a Windows-domain-based environment. Apart from being in the same network, the Linux computer is not connected to the domain. Until now, I'm using a ...
2
votes
3answers
39 views

tar append to file in archive

Good morning, I have a tar compressed archive tar.bzip2 (created using tar jcf), which contains a file named data.txt (1). On the other side, I have another file also named data.txt (2). Is ...
1
vote
3answers
32 views

TAR Files: Move Files From Subdirectories to Main Directory

I've been trying to use this code: find documents -maxdepth 1 -type f -print0 | xargs -0 tar cvf documents.tar.gz to create a backup of the directory documents. The directory has the structure: ...
0
votes
3answers
56 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 ...
3
votes
0answers
44 views

Is it safe to use tar even if there are some characters other than ASCII in filenames and paths?

Is it safe to use tar even if there are some characters other than ASCII printable characters? For example, Japanese characters, Chinese characters, newline character etc. Are there any known ...
2
votes
0answers
16 views

Remove tar compress spool from cron email

I have a crontab job that call a simple script to backup a website: 15 0 1,10,20 * * /home/username/bin/backup_whatever This is the script: #!/bin/bash TODAY=$(date +"%Y%m%d") ...
2
votes
2answers
37 views

How to specify a different “top level” name for tar?

I would like to tar root (/) and let it appear as /abc in the tar archive. Is there a tar flag for specifying a custom top-level name?
3
votes
1answer
21 views

Is it possible to add error correction codes (BCH, RS or etc.) to a single file?

As far as I know, WinRAR archives may contain ECC (error correction codes), so if the archive is slightly damaged, then it can be fixed by itself. For example, I can first encode archives.tar to ...
2
votes
1answer
31 views

'Tar' the result of a 'find', preserving the directory structure

I want to tar all the *.txt file, that I get from the result of a find, that exist into a directory having a tree like this: Directory_name dir1 file1.pdf file1.txt dir2 file2.pdf ...
0
votes
2answers
62 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 ...
-1
votes
1answer
79 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 ...
2
votes
1answer
37 views

cpio VS tar - what the best archive solution in order to compress hundred of directories to one file

I have hundreds of directories under /var/Recording, and each directory there will have subdirectories, including files, hard links and soft links. I want to compress all directories under ...
1
vote
1answer
43 views

Why can't the tape device such as '/dev/st0' use commands like 'cp' to copy contents to it?

I got this point from a book,it says Because the tape device is a disposable I/O device,so we can't use commands like 'cp' to copy. And the author recommended to use 'tar': tar -cvf /dev/st0 ...
4
votes
2answers
135 views

creating a tar archive without including parent directory

I am trying to create a graphical program for my script. Inside the script I use tar to create a tar archive. From the graphical program I get the full name of file that I want to create a tar ...
2
votes
2answers
42 views

Tar a list of files which don't all exist

I'm running a command from a script like tar -c -f ar.tar a b c d where b, c, and d may not exist, and may be directories. The solutions that I've come up with are piping the output of ls -d to ...
0
votes
2answers
39 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 ...
2
votes
1answer
33 views

How to download latest version of cmake using tar xzf?

When I did cmake --version I got this - cmake version 2.6-patch 4
2
votes
1answer
27 views

Tar using progress bar and handling multi-volumes

I'm trying to create a tar of a large LVM volume onto multiple external drives. That part is solved. Now, because it is a LONG process, I'd like a progress bar. From the excellent articles here, ...
3
votes
1answer
75 views

Estimate the size of the extracted files before extraction a `tar.gz` archive?

Before using tar to extract a .tar.gz archive, it is possible to get an estimate of how large the extracted files are in total?
7
votes
3answers
686 views

How to recompress 2 million gzip files without storing them twice?

I have about 2 million (60GiB) of gzipped small files and I would like to create a compressed archive containing all of them in an uncompressed version. Unfortunately, I cannot just uncompress them ...
0
votes
1answer
43 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"?
1
vote
1answer
39 views

Adding files to .tar from directory

Is there a way to add files to .tar file in one directory from an another directory? And at the same time list the content of the tar to see if its added. I only found ways to add files if its in the ...
1
vote
1answer
29 views

Fastest way to find whether a file exists in a number of tarballs? [closed]

Is there a more efficient way to do this other than using tar tf and checking the output of every file against the file that I'm looking for? This is the way I do it right now, but it's very slow ...
1
vote
2answers
119 views

command to get topmost directory name in compressed files

Filenames are ones shown below, but the directory will be libgit2-0.21-1 when tar xvf v0.21.1.tar.gz, so how use one-liner to get the directory name(report error if more than two directory exist): ...
2
votes
1answer
78 views

How to create a deterministic tar.gz using git-archive?

Creating a git repository for testing. ~ $ mkdir somefolder ~ $ cd somefolder/ ~/somefolder $ git init Initialized empty Git repository in /home/user/somefolder/.git/ ~/somefolder $ echo test > ...
0
votes
3answers
256 views

wget downloading tar.gz file as html?

I need to download this file http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jdk-7u67-linux-x64.tar.gz using wget. I use the command wget ...
3
votes
4answers
350 views

Does gzip add integrity/crc check to a .tar?

I run commands: tar -cf myArchive.tar myDirectory/ gzip myArchive.tar then I copy the file over a lot of unreliable mediums, and later I unpack it using: tar -xzf myArchive.tar.gz The fact that ...
3
votes
2answers
139 views

tar exits with bzip2: (stdin): trailing garbage after EOF ignored after extract

I have extracted a large (3.9GB) tar.bz2 file using the following command: tar -xjvf archive.tar.bz2 The extract proceeds fines but exits printing: bzip2: (stdin): trailing garbage after EOF ...
2
votes
1answer
49 views

Is archiving the entire filesystem from the root an effective backup strategy?

I am looking at my server through WinSCP and thinking I could tar the lot, save locally, then if starting a fresh identical server later down the line, re-upload and overwrite saving me the initial ...
0
votes
3answers
398 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
0answers
36 views

Create tar file which consists of directories from another tar file

I have tar file with three directories, dir1, dir2 and dir3. Is there a way to extract dir2 and dir3 directories to create new tar file on the fly, without extracting the directories in temporary ...
2
votes
1answer
40 views

Compress a tar file without extracting the content

Is it possible to compress a tar file such that I don't end up with an archive file in an other archive file but just an archive file containing my content fx. a tar.gz file? I don't want to extract ...
0
votes
0answers
34 views

tar en Meme Suite

I'm new to Mac OS X 10.9 Mavericks and wanted to install a bionformatic program called Meme Suite (http://meme.nbcr.net/meme/) but I get the following errors: tar:Error opening archive Failed to open ...
2
votes
1answer
48 views

get the name of new directory that created out of tar command

How can I get the name of new directories that were crated out of tar -xvf command? For ex. When I run the command tar -xvf jdk-7u17-linux-x64.tar.gz the contents of this tar extracted in a new ...
0
votes
1answer
137 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
57 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 ...
4
votes
2answers
226 views

can't decompress .tgz using gunzip

I was able to archive and compress a folder with the following command: tar -cvfz example2.tgz example1 I then removed the example1 folder and tried to unpack the archive using this command: tar ...
2
votes
0answers
44 views

Is it possible to create an incremental snapshot file from an existing tar archive?

I have created a large tar archive and am now looking to do an incremental backup. The documentation indicates that a snapshot file can only be created when the initial tar backup file is created. ...
3
votes
2answers
72 views

In what situation would a tarball (.tgz) be almost the same size as the original

I just tarballed a dump of some websites (configs, image directory, css directory, and site content (html files etc)) using tar czf sitedump.tgz backup_folder/. The original "backup_folder" was about ...
1
vote
1answer
37 views

in which units does tar --checkpoint measure?

GNU tar offers the option --checkpoint where a message should be printed each checkpointreached. Question:: In what does --checkpoint measure? My best guess is Bytes. I wasn't able to find a hint ...
0
votes
0answers
76 views

Terminal freezes after using tar or gz

On Linux within bash the Pseudo Terminal window (terminator) as well as the Terminal itself "freezes" when trying to use autocomplete (TAB) as well as after getting an error message using gzip and ...
8
votes
2answers
232 views

How to convince tar (etc.) to archive block device contents?

I have six Linux logical volumes that together back a virtual machine. The VM is currently shutdown, so its easy to take consistent images of them. I'd like to pack all six images together in an ...
1
vote
1answer
88 views

How to tar only files in a multiple of directories but not directory?

I have three folders under the Test folder. Test ----> dir1, dir2, dir3 Under dir1,dir2 and dir3, I have lot of files. I want to tar only the files not the dir1, dir2 and dir3.
0
votes
1answer
84 views

How to add specific directory for a file during tar file generation?

When I create a .tar file using the tar command, what option do I need to use to add a specific directory hierarchy to the file? For example: Test_File.tar |__ MAIN |__ SUB1 ...
2
votes
4answers
5k views

tar exits on “Cannot stat: No such file of directory”, why?

I'm trying to create tar.gz file using the following command: sudo tar -vcfz dvr_rdk_v1.tar.gz dvr_rdk/ It then start to create files (many files in folder), but then I get the following error: ...
0
votes
1answer
81 views

gtar fails to perform incremental backup

The following script fails to perform incremental backup, but creates full backup instead. On another FreeBSD server exactly same script works just fine (creating incremental backups). Servers are ...
1
vote
1answer
37 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 ...
0
votes
2answers
56 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 ...
2
votes
1answer
49 views

Tar actions not working as intended

I have a huge uncompressed tar file (1 tb) and I want to check it, therefore I am trying to extract it to see if everything goes well. Since it is going to take a long time, I'd like to have some info ...
6
votes
2answers
374 views

Is there a way to convert a zip to a tar without extracting it to the filesystem?

Is there a way to convert a zip archive to a tar archive without extracting to a temporary directory first? (and without writing my own implementation of tar or unzip)