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

learn more… | top users | synonyms

6
votes
2answers
160 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
62 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
43 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
106 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
45 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
32 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
178 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
87 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
22 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
56 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
24 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
65 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
59 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
50 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
35 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
56 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
68 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
47 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
78 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
130 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
60 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 ...
1
vote
1answer
323 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
325 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
48 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
65 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
218 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
34 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
21 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
72 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
19 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
401 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
57 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
41 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
82 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
104 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
619 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
56 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
94 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 ...
0
votes
1answer
88 views

My ISO Downloaded as Tar.Gz?

I was downloading a Linux-based operating system but instead of ISO, it came as tar.gz (OEM.tar.gz, I think but maybe not). How do I burn this OS to a flash drive?
5
votes
2answers
230 views

How is the order in which tar works on files determined?

$ touch dir/{{1..8},{a..p}} $ tar cJvf file.tar.xz dir/ dir/ dir/o dir/k dir/b dir/3 dir/1 dir/i dir/7 dir/4 dir/e dir/a dir/g dir/2 dir/d dir/5 dir/8 dir/c dir/n dir/f dir/h dir/6 dir/l dir/m dir/j ...
6
votes
2answers
396 views

How can I speed up operations on sparse files with tar, gzip, rsync?

I have a sparse file. (du -h reports 3G and du -h --apparent-size reports 100G.) So far, so good. Now, when I want to compress the file using tar or send it over the network using rsync, it will ...
0
votes
2answers
122 views

OpenMeetings latest release not unzipping

I am trying to install OpenMeetings for centos 6.5 32 bit but everytime I try to untar or unzip the latest binary release I get the following error: tar -xzvf apache-openmeetings-3.0.0.tar.gz gzip: ...
1
vote
1answer
111 views

Symlinks and permissions in backup archives

I installed linux on another computer and I want to move my /home directory to that computer. I want to backup that directory with any file permission, symlinks etc. how should I do it? Are there any ...
0
votes
1answer
36 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 ...
8
votes
4answers
140 views

Virtual write-only file system for storing files in archive

I have an embarrassingly parallel process that creates a huge amount of nearly (but not completely) identical files. Is there a way to archive the files "on the fly", so that the data does not consume ...
3
votes
2answers
66 views

TAR: better to skip directory or use split

I've got a file.tar.gz that I create and backup to Amazon S3. It's gotten bigger than Amazon's limits and thus has not been backing up. This is my current command: tar -cpzf file.tar.gz directory/ ...
6
votes
1answer
259 views

bash scripting - read tarball from stdin

I have a task I need to script that I feel should be stupidly simple, but I'm actually having a rather tough time. I have a short bash script that takes a specific type of application in tarball form ...