The tar archive format and/or the command-line utility for working with tar files.
1
vote
1answer
21 views
Ignore Symlinks when Extracting Tarball
I have a relatively simple question that I cannot seem to find the answer for. I am attempting to extract a tarball (*.tgz, to be exact) and receiving terminal errors on extracted symlinks. ...
-1
votes
1answer
29 views
What are the relative merits of the various standard Unix archival utilities? [closed]
There are many archival tools for Unix, with varying degrees of availability. To make matters more confusing, many of them can write each other's formats.
I am seeking more information on their ...
6
votes
4answers
1k views
howto inflate AND extract a .tar.bz2 using the 7-zip command line tool
I have a .tar.bz2 file that I want to be decompressed and extracted via the 7-zip commandline tool.
So basically I'm looking for the equivalent of
tar -xjf foo.tar.bz2
with 7-zip there is only the ...
3
votes
2answers
4k views
Compress a folder with tar?
I'm trying to compress a folder (/var/www/) to ~/www_backups/$time.tar where $time is the current date.
This is what I have:
cd /var/www && sudo tar -czf ~/www_backups $time"
I am ...
4
votes
3answers
426 views
What does the -f parameter do in the tar command
When using tar I always include -f in the parameters but I have no idea why.
I looked up the man and it said;
-f, --file [HOSTNAME:]F
use archive file or device F (default
"-", meaning ...
1
vote
2answers
58 views
How to install tar file (jhead) on Mac or Linux machine
I'm new to Linux and tar balls and was wondering how to properly install them on a Mac or Linux machine. I would prefer to know how to install on a mac but I just need some help understanding them. I ...
3
votes
1answer
47 views
How can I copy a file between server using bsdtar?
I'm looking for the fastest way of copying a file between 2 linux servers using bsdtar.
With normal tar, I would do something like:
ssh root@remote 'tar -cz -C /my/path/ big_file.txt' | tar -zxv
...
5
votes
4answers
1k views
How do I use the Unix tar command with an implicit filepath?
I am using the tar -xvf command and it is taking the explicit path. However, the path is full.
Example:
tar -xvf 13.2.tar
It is taking the path of /mnt folder. The / folder is full.
How can I tar ...
8
votes
3answers
225 views
Universal extractors
With an increasing number of archive/compression file formats, is there a single free/open-source command line tool to rule them all? Perhaps something with a consistent / unified set of flags? (note ...
11
votes
7answers
4k views
What to use to backup files, preserving ACLs?
When using the tar utility to store files in backups one loses the extended ACLs.
Is there some commonly used and not hackish solution (like: create a script that will recrate the ACLs from scratch) ...
7
votes
1answer
146 views
Under what circumstances does gunzip & tar xf work but tar xzf fail?
To illustrate the point: I have downloaded the LEDA library from the company's website. Using tar -xzf on it fails:
$ tar -xzf LEDA-6.3-free-fedora-core-8-64-g++-4.1.2-mt.tar.gz
tar: This does not ...
2
votes
2answers
107 views
How to scp/tar files that are in between specific days?
I need to copy db log files between two suse servers where I am interested in files ONLY in between 10.3.2013 - 13.3.2013
It is desired to compress the files before copying so I tar them and scp. ...
2
votes
6answers
74 views
How to make tar globbing work with the 'change directory' option
I have the followin directory structure:
base/
files/
archives/
scripts/
I want a script to run from scripts/, compress files that match results.*.log in files/ into a gzipped tar archive ...
3
votes
8answers
1k views
Triple compression and I only save 1% in space?
I've been trying to save space on my linux server, and I had a folder containting, in subfolders, 22GB of images.
So I decided to compress them.
First I used tar:
tar -zcf folder.tar folder
Then ...
1
vote
1answer
58 views
Difference between --xz and --lzma in GNU tar?
As far as I can tell, XZ is a container that uses the LZMA2 algorithm (i.e. extended LZMA); but e.g.
$ xz foo/
complains about foo/ being a directory. So presumably the correct way to preserve ...
2
votes
1answer
37 views
Do tar archives include user/group name by default?
In tar's man page I stumbled upon two options:
--numeric-owner: always use numbers for user/group names
--owner=NAME: force NAME as owner for added files
This made me wonder: When I tar ...
3
votes
1answer
149 views
scp and compress at the same time, no intermediate save
What is the canonical way to:
scp a file to a remote location
compress the file in transit (tar or not, single file or whole folder, 7za or something else even more efficient)
do the above without ...
-1
votes
2answers
2k views
Wait for process to finish before going to the next line in shell script
I have a script I made to create a backup. I need to make sure the backup is ready before it runs the /home/ftp.sh command. How can I do so? I use CentOS 5.6
#!/bin/bash
tar -Pcf ...
2
votes
2answers
75 views
Remove files from tar archive
I have a large file foo.tar.xz that contains a lot (say 200000) of files. I figured out that this archive contains some (around 5000) files I don't want. I don't have sufficient disk space to ...
2
votes
4answers
58 views
What year did the Unix “tar” program get released?
Here's an simple question: what year did the Unix "tar" (TApe ARchive) come out? I wasn't able to find the answer with Internet searches.
0
votes
2answers
74 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 ...
9
votes
6answers
4k views
tar + rsync + untar. Any speed benefit over just rsync?
I often find myself sending folders with 10K - 100K of files to a remote machine (within the same network on-campus).
I was just wondering if there are reasons to believe that,
tar + rsync + ...
10
votes
5answers
4k views
“tar: unrecognized option --warning” during 'apt-get install'
I just ran apt-get upgrade on my debian 5 vps and I got this error:
tar: unrecognized option `--warning=no-timestamp'
Now when I try to install other packages e.g: imagemagick I get the same ...
1
vote
1answer
371 views
How to create tar archive in a different directory?
I want to create a tar archive in a different directory rather than the current directory.
I tried this command:
tar czf file.tar.gz file1 -C /var/www/
but it creates the archive in the current ...
0
votes
1answer
87 views
Untar Without Top-Level Directory
I have a tar (websites.tgz) that contain a bunch of Drupal websites that are tarred up starting with 'htdocs'
I need to untar them into
/local/htdocs/web1
/local/htdocs/web2
and so on. But I ...
4
votes
3answers
124 views
Tar piped to split piped to scp
So I'm trying to transfer a bunch of files via SCP. Some of these are too large to be stored on the recipient (Android phone, 4GB file size limit).
The sender is almost out of space, so I can't ...
7
votes
3answers
712 views
How to truely install a tar.gz file on Linux - how to manage manually-installed (or standalone) applications?
I see all these links explaining packages and .debs... I know that... and there are many kludges to get tar.gz files working (eg: update-alternatives for Java or manually dropping the file in ...
7
votes
3answers
590 views
Untar only a certain number of files from a large tarball
I have a large tarball that is busy being FTP'd over from a remote system to our local system.
I want to know if it is possible to start untarring lets say 50 files at a time so that those files can ...
1
vote
2answers
2k views
How to recover a corrupted “tar.gz” file
I suddenly needed to recover an old tar.gz file, but as soon as I execute so:
tar -zxvf filename.tar.gz
I get this:
gzip: stdin: invalid compressed data--format violated
tar: Child returned ...
5
votes
3answers
1k views
How do you verify a tar archive that is already written?
I know that you can do -W when creating an archive, but how do you verify and already-created archive? tvWf says it's not a valid tar archive?
$ mkdir tmp
$ echo asdkfjh > tmp/a
$ echo qweroiu ...
1
vote
2answers
236 views
Create a tar archive split into blocks of a maximum size
I need to backup a fairly large directory, but I am limited by the size of individual files. I'd like to essentially create a tar.(gz|bz2) archive which is split into 200MB maximum archives. ...
2
votes
4answers
1k views
tar: Removing leading `/' from member names
root@server # tar fcz bkup.tar.gz /home/foo/
tar: Removing leading `/' from member names
How can I solve this problem and keep the / on file names ?
2
votes
2answers
317 views
How to extract specific file(s) from tar.gz
How can we extract specific files from a large tar.gz file? I found the process of extracting files from a tar in Untar only a certain number of files from a large tarball but, when i tried the ...
1
vote
0answers
81 views
How to fix the corruption of the tar balls?
I was making a complete server backup and tried making the tar balls of each directory structure by using the following commands:
nohup tar -cvf - /etc | gzip -9 -c > /opt/Backup_4_Jan/etc.tgz ...
3
votes
1answer
248 views
Force the owner and group for the contents of a tar file?
I would like to create a tar file with contents belonging to an owner:group pair who do not exist on the system from which the file is being made.
Here's the direction I've tried:
tar ca ...
4
votes
2answers
570 views
tar files from another directory without copying them
This should be very simple for experts in here.
I have a Linux account with user disk quota of only 6GB. There is some data-folder in /opt with about 3GB of data with when compressed comes up 1GB. ...
6
votes
1answer
131 views
tar: how can I exclude intermediate directories but include leaf directories?
I want to create a tar file suitable for extracting into /. I've created a work directory that represents the root of the file system, and it has all the stuff I want included in the tar underneath, ...
5
votes
1answer
177 views
On the Fly Compression for a Directory
I have a directory that is always going to be storing text files that are rarely (think weekly) used. Naturally this is a great place to use compression. However, rather than having to use tar ever ...
1
vote
2answers
769 views
Compress old log file into single zip-linux
I have a folder /home/testuser/log which contain log files of one day old *.log. I wish to compress all the log files older than one day to a single zip(gzip or tar.gz) and delete the older files.
I ...
1
vote
1answer
76 views
tar -c Error Messages and Source Files?
During a tar archiving operation with tar -cvf archive.tar source does the resulting tar archive that reports a file changed as we read it error still contain "some version" of the source file that it ...
2
votes
2answers
124 views
Different count for compressed file listing vs directory listing
I was taking a backup of a folder, where I used the following command :
sudo tar -zcvf www.tar.gz /var/www/
It successfully compressed, just for verifying the number of files in the compressed ...
17
votes
2answers
791 views
What does .??* mean in a shell command?
The following command will tar all "dot" files and folders:
tar -zcvf dotfiles.tar.gz .??*
I am familiar with regular expressions, but I don't understand how to interpret .??*. I executed ls .??* ...
2
votes
1answer
200 views
How do I resume a tar command which was killed
I was doing a : tar -cvf and I had to killed it with ctrl-C.
I know I should have done a Ctrl-Z and then bring back the task to foreground... but it's not the story.
Can I resume from the point I ...
4
votes
1answer
185 views
Does tar -x Extract to Current Directory or Does it Extract to the Source of the Archive?
Does tar -x by default just extract to the current directory or does it try to reproduce the original directory structure including overwriting the original source? I know I can specify a folder to ...
5
votes
5answers
4k views
How can i view the contents of a tar.gz file (filenames + filesize)
I cannot use tar -tz as the solaris version I'm using does not accept the -z option.
I tried something like gunzip file.tar.gz | tar -tv but that only gives:
tar: /dev/rmt/0: No such file or ...
3
votes
1answer
472 views
Extrat tar “Cannot open: File name too long”
I made a tar with a directory on a remote machine with:
tar -czvf
I scp it to my local machine, where I wanted to untar it:
tar -xzvf
But I get : Cannot open: File name too long
On my local ...
3
votes
3answers
212 views
Tar a file with a different name
To make my environment deployable, I occasionally tar up some handy files and scripts:
tar -czvf env.tgz .vimrc .vim/ bin/lsl bin/s
I would like to add .bashrc to the mix, but I have some sensitive ...
1
vote
2answers
1k views
tar: Unexpected EOF in archive
I am trying extract .tar.gz file it but with no luck
gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
the ...
5
votes
2answers
2k views
Can I automate tar's multi-volume-feature?
Ok, so I've just had a read through this page after a way to improve my current backup solution on my Debian server. Tar seems to be offering a quite nice multi-volume feature, although when I try it ...
6
votes
3answers
168 views
How to convert tar file from gnu format to pax format
On the one hand I have a lot of tar files created with gnu format, and on the other hand I have a tool that only supports pax (aka posix) format. I am looking for an easy way to convert the existing ...
