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

learn more… | top users | synonyms

2
votes
1answer
28 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
38 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
118 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
40 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
0answers
43 views

Creating a tar - Cannot stat: No such file or directory [closed]

dsdreating a tar - Cannot stat: No such file or directory
0
votes
2answers
36 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
32 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
24 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
55 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
665 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
39 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
29 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
27 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
117 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
56 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
132 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
308 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
95 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
46 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
320 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
35 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
39 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
29 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
44 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
95 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
56 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
203 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
36 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
67 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
32 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
69 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
213 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
78 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
60 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
3k 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
70 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
34 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
48 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
44 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
307 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)
1
vote
4answers
170 views

Why can't tar extract .zip files? [closed]

I tried a majority of the formats (gzip, etc.) to extract a zip file with tar, and when I became frustrated enough to Google for it, I found no way to extract a zip file with tar and only ...
0
votes
3answers
108 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 ...
2
votes
3answers
625 views

How do I use gunzip and tar to extract my tar.gz file to the specific directory I want?

When I run gunzip -dc /path_to_tar.gz_file/zip1.tar.gz | tar xf - in the directory where the tar.gz file is located, it extracts just fine. How do I tell it to place the contents from the tar.gz file ...
0
votes
1answer
624 views

Encrypting and compressing

Is there a better way to compress and then encrypt files other than tar followed by openssl or gpg?
1
vote
2answers
489 views

Create a tar archive of the current directory without preceding period

When I do the following: tar czvf ../myarchive.tar.gz ./ I get a single (annoying) root folder in my tar archive: How do I remove this awful period when creating the archive?
6
votes
3answers
377 views

Multiple tar processes writing to the same archive file at once

I am running many tasks on a Linux cluster. Each task creates many output files. When all tasks are finished, I run something like tar cf foo.tar output_files/to create a tar archive. This is a very ...
2
votes
0answers
399 views

tar: /dev/st0: Cannot write: Input/output error

When we attempt to use tar to write data to an LTO-5 tape, we get the following error. The device starts to write, and then fails. See the tar command and output, followed by the dmesg output. I ...
-1
votes
2answers
49 views

Does tar create new inodes to be archived?

When tar is asked to archive a directory, does it create a new inode for each file system object? If yes, how does it query and save the meta-data? Won't the format of storing this inode metadata vary ...
2
votes
2answers
284 views

How to extract a single file from tbz

I have the following archived directory: itunes20140618.tbz I want to extract single file from it called: itunes20140618/video How would I do this? So far, I am doing $ bzip2 -d ...
1
vote
1answer
39 views

Un-archiving single file hanging

I am trying to unarchive a very large directory. Here is what works to untar the entire thing: $ sudo tar -xjf itunes20140618.tbz --verbose x itunes20140618/ x itunes20140618/genre_artist x ...