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

learn more… | top users | synonyms

7
votes
2answers
87 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
38 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
20 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 ...
1
vote
4answers
262 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
36 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 ...
-2
votes
0answers
19 views

How to manually remove GCC (without package manager) on Mac OS X Mavericks

I would like to completely remove GCC from my Mac OS X Mavericks system. The problem is I have installed it manually without a package manager. I have tried to list all files from the GCC tar archive ...
1
vote
1answer
22 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
34 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
31 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
163 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
73 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
52 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
125 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
53 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
41 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?
5
votes
3answers
199 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
111 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
28 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
69 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
27 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 ...
3
votes
1answer
79 views

Compose and pipe a gzipped tar archive in one go

I'm trying to come up with an effective way to create a gzipped archive of various system partitions on Android, piping everything out to stdout so as to be able to encrypt it as it comes across via ...
2
votes
0answers
68 views

debootstrap terminates partway through with “stdin: not in compressed format”

I'm on an Arch GNU/Linux system, fully up-to-date (both official repositories and from the AUR). I'm attempting to install a copy of Debian Wheezy so that I can chroot into it and work with the ...
1
vote
2answers
64 views

tar compression without directory structure

Under my current directory, I have two sub-directories: dir_1/ - file1.png - file2.png ... - fileN.png dir_2/ - fileA.txt - ... - fileZ.txt When I tar compress the two ...
2
votes
0answers
37 views

How can I capture a consistent snapshot of a directory and all its children?

We have an application that periodically backs itself up to a directory on the local file system. Inside this directory are several more files and directories. I want to produce a "snapshot" of all ...
0
votes
1answer
36 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 ...
5
votes
2answers
64 views

How to backup dir structure ignoring files & dirs without read permission

Any ideas how to back up a directory structure for which there are some files and/or directories for which you do not have permission to read? I'd like to just ignore those, without backup (tar? jar?) ...
1
vote
1answer
75 views

unable to back-up data from android tablet to laptop using tar!

I'm using tar to back-up data from my android tablet to laptop. But it is showing some error. ravbholua@ravbholua-Aspire-5315:/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/9$ tar -cvf ...
2
votes
0answers
55 views

Corrupt files after extracting with Cygwin's GNU tar

I have a bunch of tarball backups which I just restored onto my new Windows 8.1 + Cygwin system using GNU tar: zsh$ for file in **/*.tgz; do tar xvzf $file; done To my surprise a lot of these ...
0
votes
0answers
85 views

Archive (Compress) giant folder in Linux using command line without termination

Well, I'm just trying to compress a whole directory (infact giant!) under Linux using a terminal. The entire folder size is about 7 GB. I've used below command to create the archive. tar -zcvf ...
1
vote
1answer
198 views

Why am I getting an error: “Failed to open '/dev/st0'” when extracting an archive with bsdtar?

I installed bsdtar from source (from the libarchive website) because I could not find an rpm nor a package in yum. I'm able to see bsdtar's help message. For example: $ bsdtar --help First option ...
0
votes
0answers
68 views

TAR not excluding directories with date pattern

I've written this small script: #!/bin/bash TODAY=`date --rfc-3339=date` CHECKDATE=`date --date "2 days ago" --rfc-3339=date` FILENAME=$TODAY-package.tar tar cvf $FILENAME --no-recursion ...
2
votes
2answers
620 views

Test tar file integrity in bash

I have a bash script that creates a '.tar' file. Once the file is created, I would like to test its integrity and send an email to the root user if the integrity is bad. I know I would need to use ...
1
vote
3answers
619 views

Bash script for automatic tar backup of chosen files and directories

Within a given directory in linux environment, I need to pick all files modified after a certain date (let's say 7 days) as well as all directories (only in root directory, hence non recursively) ...
2
votes
2answers
55 views

Making tar split archives as it compresses?

I want to compress a file with tar but I'd like to know if its possible to do it while splitting the files. I know that in windows is possible to do this with winrar, I also know I can use split but ...
1
vote
1answer
92 views

untar specific directory

tar tvf filename.tar gives me: -rwxrwxrwx 0/0 544795 2010-03-15 12:49 35 WOO WORDPRESS THEMES/bloggingstream.zip -rwxrwxrwx 0/0 1659095 2010-03-15 12:51 35 WOO WORDPRESS ...
0
votes
4answers
270 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 ...
1
vote
2answers
37 views

remove files after insertion into tarball

I want to limit the number of files that get put into a tar ball and erease them after they've been inserted into the tarball and being indipendent from the current directory. I've tried this: tar -C ...
17
votes
3answers
2k views

Does tar actually compress files, or just group them together?

I usually assumed that tar was a compression utility, but I am unsure, does it actually compress files, or is it just like an ISO file, a file to hold files?
0
votes
0answers
22 views

How to set ST_BUFFER_BLOCK in centos6.5

To enable large transfers to tape under Linux (>64 KB per write), i have to set the ST_BUFFER_BLOCKS for that i have to edit the file /usr/src/linux/drivers/scsi/st_options.h and change the ...
0
votes
0answers
80 views

Extract specific folder from a tar.gz

I know this question was previously asked on this site before like here 1 and here 2 but no success for me. I want to extract the Measures folder from my S012011_csv.tar.gz zipped file. If I do tar ...
0
votes
1answer
20 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 ...
2
votes
1answer
542 views

tar: /dev/nst0: Cannot write: Input/output error when taking backup

When I try to take backup of data more than 1MB in a tape (LTO3) using tar command it showing me the following error. xyz@localhost# tar -cvf /dev/nst0 file1.tar file1.tar tar: /dev/nst0: Cannot ...
2
votes
1answer
64 views

Difference between tar and star

I've been learning about the syntax and usage of tar and came across star. I've read this paragraph from the star manpage: Star includes the first free implementation of POSIX.1-2001 extended tar ...
0
votes
1answer
31 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 ...
1
vote
1answer
46 views

TAR Backup to Remote Server [duplicate]

I'm wanting to do an incremental backup from my Linux computer to server. I've made the ssh link and I can at least get RSYNC to load the files incrementally, which I plan to do daily using ...
2
votes
3answers
88 views

Is it possible to generate a separate file list when creating a tarball?

When using tar for backups I'd like to create a separate list of the files that is included in the archive for storing alongside the backup tarball. I also want to be able to store the error messages ...
1
vote
0answers
142 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 ...
15
votes
4answers
637 views

How can I determine if running tar will cause disk to fill up

If I run tar -cvf on a directory of size 937MB to create an easily downloadable copy of a deeply nested folder structure, do I risk filling the disk given the following df -h output: /dev/xvda1 ...
1
vote
2answers
66 views

tar specific files based on a pattern

I got a lot of files with the following format: 2014_04_01_11.txt 2014_04_01_12.txt 2014_04_01_13.txt 2013_03_25_12.txt 2013_04_29_15.txt I would like to tar all theses files into an archive 20?? _ ...
1
vote
1answer
109 views

`tar` with `find` with removing original file extension

I want to create tb2 files from bunch of text files like this. tar cfj $(basename ./2014_04_09.txt .txt).tb2 $(basename ./2014_04_09.txt) With this command I can create a archive file 2014_04_09.tb2 ...