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

learn more… | top users | synonyms

1
vote
1answer
29 views

How to load directory into filesystem cache?

I have a several GB directory that is rarely accessed, but when it is I'd like to be able to read the files in it quickly instead of having to wait. Since the files are rarely accessed they will not ...
1
vote
2answers
67 views

How to Distribute Computing of `tar czf` for Longer Time?

My systems go under heavy load when I run sudo tar czf /media/masi/ntfsDisc/backup_home.tar.gz $HOME/ Fans goes to max etc. I would like to find a better balance between computing and power ...
-1
votes
3answers
21 views

Making tar file to un tar file

using Red Hat Enterprise Linux Server release 5.6 (Tikanga), when I fire tar command it's taking huge time to untar file. Below is the command which I have used: tar zcvf filename.tar filename ...
-4
votes
0answers
22 views

Differences in java installation methods in a Linux system [closed]

When installing java at the terminal with these methods: sudo apt-get install openjdk-7-jdk tar xvzf jdk-7u45-linux-i586.tar.gz What are the differences between these scenarios? Which location ...
11
votes
4answers
6k views

creating archive using tar including all 'dotfiles' but excluding all subdirectories and /wo directory structure

I want to backup all the 'dotfiles' (f.e. .zshrc) under my home directory with tar, but excluding the directory structure and all subdirectories. I've tried it several times with different commands, ...
3
votes
2answers
201 views

Why does tar hang with 100% CPU if files list has leading spaces

Tar hangs with 100 % CPU load if the --files-from <LISTFILE> option is used and the <LISTFILE> contains leading spaces. Why is that? To reproduce: Given two files file1 and file2 of ...
2
votes
0answers
20 views

Make bootable disk from tar archive

I have a compressed tar archive from a SLES 11 root directory. I'd like to boot another machine with a live linux, extract my OS archive on a disk, and make the disk bootable. Is there any easy way to ...
7
votes
2answers
7k 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 ...
0
votes
1answer
18 views

Tar --exclude directory isn't being excluded

I need some help with my backup script. Looks like it's excluding all the directories I've specified except for one /var/backups which contains the tar file just created with the script. What am I ...
1
vote
1answer
46 views

Extract hard link files with tar

I am trying to get list of all files in tar folder show them all on a page with links to download files. On click on single files it will be downloaded. This all is working fine except the hard link ...
4
votes
2answers
59 views

Print archive file list instantly (without decompressing entire archive)

A problem with .tar.gz archives is that, when I try to just list an archive's content, the computer actually decompresses it, which would take a very long time if the file is large. Other file ...
3
votes
3answers
1k views

How to install BPG (Better Portable Graphics) on Linux Mint 17?

How do I install BPG (Better Portable Graphics) on Linux Mint 17? I downloaded the tar.gz file from Fabrice Bellard's website. The ReadMe file says, Edit the Makefile to change the compile ...
2
votes
1answer
1k 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 ...
1
vote
1answer
948 views

unpigz (and untar) to a specific directory

I know how to gunzip a file to a selected location. But when it comes to utilizing all CPU power, many consider pigz instead of gzip. So, the question is how do I unpigz (and untar) a *.tar.gz file ...
1
vote
1answer
44 views

tar specific files in several different subdirectories

I have the following folder structure A |-B | |-C | |-1.log | |-2.log |-10.log |-D |-E |-F |-php.log |-H |-php.log I want to collect all the log files and the php file present ...
2
votes
2answers
294 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 ...
1
vote
1answer
43 views

Restoring file system using tar causes login loop

Note: I am doing this to learn more about linux. I understand there are other tools that can be used with simple interfaces. Note: I am using Fedora 23. I have it installed physically on an SSD and ...
1
vote
5answers
56 views

tar without preserving user [duplicate]

I'd like to compress some files for http distribution, but found that .tar.gz keeps the user name and user ID and there doesn't seem to be any way to not do that? (There is a --numeric-owner option ...
1
vote
1answer
31 views

Compressing a folder but do not compress specific file types but include them in the gz file

I am using tar with pigz to compress a folder and save a backup. Size of this folder ~250 GB or more. This folder has variety of content including numerous text and log files, ISOs and zip files in ...
2
votes
0answers
30 views

Why does tar list multiple entries for some files? [duplicate]

In a folder with a single file (image.jpg) I run the following commands $ ls -a . .. image.jpg $ tar cf target.tar image.jpg Listing contents of the archive $ tar tvf target.tar -...
10
votes
4answers
13k views

Efficiently remove file(s) from large .tgz

Assume i have an gzip compressed tar-ball compressedArchive.tgz (+100 files, totaling +5gb). What would be the fastest way to remove all entries matching a given filename pattern for example prefix*....
1
vote
1answer
48 views

Extracting files to current directory

I want to find and tar/archive all my scripts ending .sh so I wrote something like that: touch ~/archive.tar; find ~ -type f -name '*.sh' -exec rvf ~/archive.tar {} \; The problem is that after I ...
2
votes
2answers
91 views

Using tar with find

Lets say we want to find a certain files , use tar on them and delete them. I tried using touch "mycompress.bz2.tar" find . \( -name "*.c" -o -name "*.sh*" \) -exec tar ujf "mycompress.bz2.tar" {} "+"...
3
votes
1answer
40 views

Can I somehow update compressed archives?

I'm trying to find all files with given extension but I'm getting this error: tar: Cannot update compressed archives Try 'tar --help' or 'tar --usage' for more information. tar: Cannot update ...
3
votes
4answers
94 views

'find -mtime -1 -print | xargs tar' archives all files from directory ignoring the -mtime -1 argument

I'm trying to create a backup script. I've managed to get this script working fine on a CentOS 6.7 machine and am now trying to get it working properly on Debian 7. I am running into a problem I can'...
2
votes
2answers
8k views

Create .tar.gz from a directory omitting some subdirectories and add only new or changed files

I need to create a script, maybe bash, maybe just a .sh that checks for files changes on a root directory and sub-directories of the root, and adds to a new file. The tar.gz file name should have the ...
3
votes
2answers
41 views

tar while avoiding compression of certain file types

I'm trying to create a very large backup of an entire hard disk, using tar. However, there are many files such as CR2 (Canon RAW 2), JPG and a few other files which are already compressed. I have ...
13
votes
3answers
28k views

Extract multiple .tar.gz files with a single tar call

I was wondering whether (and, of course, how) it’s possible to tell tar to extract multiple files in a single run. I’m an experienced Unix user for several years and of course I know that you can use ...
6
votes
3answers
470 views

A lot of “._” files inside a tar

I have a tar that was generated on a linux machine. I need to upload part of that tar to another linux machine. The full tar is huge and will take hours to upload. I am now on a Mac OSX machine and ...
4
votes
1answer
35 views

Tar directory into independent archive files no larger than a certain size

I have a directory containing many files. Together, these files take up several gigabytes of space. I'd like to compress this directory. But compressing the directory into a single file will make ...
1
vote
2answers
42 views

Correct syntax for including .* directories with tar

I'm trying to include files that match */*/.thisdirectory/* in a tar archive. What's the correct syntax? Apparently this is not: > find . . ./bar ./bar/.a ./bar/.a/baz ./foo ./foo/.a > tar --...
5
votes
2answers
60 views

Change user id and group id ownership of files within a tarball?

I have a tarball and the files it contains do not have the right user and group ownership. Files are owned jenkins:jenkins and I'd like them to be owned naftuli:othergroup. Is there a way for me to ...
14
votes
5answers
1k views

Compress a large number of large files fast

I have about 200 GB of log data generated daily, distributed among about 150 different log files. I have a script that moves the files to a temporary location and does a tar-bz2 on the temporary ...
1
vote
2answers
33 views

How to extract files to “/usr” directory without overriding other files?

I download swift installation package, and extract it into my home directory: # tar -C / -xvf swift-2.2.1-RELEASE-ubuntu14.04.tar.gz swift-2.2.1-RELEASE-ubuntu14.04/usr/ swift-2.2.1-RELEASE-...
0
votes
1answer
38 views

tar directories containing spaces [duplicate]

I want to archive my photos into tar archives. The directory containing photos has one dir per year and multiple dirs inside each year dir: Photos 2005 2006 Some dir with spaces ...
1
vote
1answer
35 views

unzip/untar files using Curl in ftp server

In the curl command we can delete,rename and move files from a FTP server using Curl like in the command below: curl -v -u username:pwd ftp://host/FileTodelete -Q "DELE FileTodelete" Can we untar ...
-1
votes
3answers
56 views

Wrong parameters passed to tar command makes file1 unusable!

Wrong parameters passed to tar command makes file1 unusable!! Correct command to tar file is: $ tar cvf total.tar file1 file2 but upon using the below format I am not able to recover file1 $ tar ...
93
votes
8answers
11k views

Why would I tar a single file?

At my company, we download a local development database snapshot as a db.dump.tar.gz file. The compression makes sense, but the tarball only contains a single file (db.dump). Is there any point to ...
6
votes
2answers
777 views

Anonymous tarballs

Tar encodes my user name into the tarball. Can I force it to make a fully anonymous tarball? --owner root replaces only some instances of my user name. Adding USER=root: USER=root tar c --owner root ...
27
votes
3answers
3k views

How do I securely extract an untrusted tar file?

I would like to be able to extract a tar file, such that all extracted files are placed under a certain prefix directory. Any attempt by the tar files to write to outside directories should cause the ...
-6
votes
3answers
7k views

tar: “No space left on device”

I'm a Debian user. While I was trying apt-get install <package> I got this: tar: ./es_DO/LC_ADDRESS: Cannot write: No space left on device tar: ./es_DO/LC_IDENTIFICATION: Cannot write: No space ...
1
vote
2answers
44 views

Solaris tar: “symbolic link failed: Not a directory”

When unpacking a tar archive with a symlink under Solaris 10, I get this error: tar: lib/jre/: symbolic link failed: Not a directory The lib/jre symlink points to lib/jre1.8.0_46 which is in the ...
2
votes
1answer
6k views

How to install adobe flash tar?

I have a problem getting Flash working in Mint13 XFCE. Now I have downloaded the tar file, but I don't understand what I have to do to get this installed. I have this file: ...
0
votes
3answers
1k views

find -exec ls -lR {} \; returns every item twice

Background: I'm currently writing an archiving script, which creates gzipped tarballs from some folders and their contents. It should be able to synchronize the gzipped archives with the sources ...
0
votes
1answer
51 views

tar: option requires an argument — 'f'

I am trying to download content by following this tutorial. But when I use the following code from the tutorial: curl https://start.spring.io/starter.tgz -d style=web -d name=simple | tar -xzvf ...
2
votes
3answers
47 views

Open tar-file that ends with .b

I have a tar file that ends with .b and I dont know how to open it. Neither in windows, neither Linux I've been successful to open it. data.ext4.tar.b Another tar that ends with .a could easily be ...
1
vote
1answer
32 views

How to search recursively within several levels of embedded tar tgz files? [duplicate]

Can somebody help me to figure out a command to find a file recursively that is embedded in a tgz file which is within another tgz files recursively: MainFile.tgz → SubFile1.tgz → SubFile2.tgz → ...
6
votes
4answers
1k views

Find recursively all archive files of diverse archive formats and search them for file name patterns

At best I would like to have a call like this: $searchtool /path/to/search/ -contained-file-name "*vacation*jpg" ... so that this tool does a recursive scan of the given path takes all files with ...
18
votes
5answers
3k 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 ...
4
votes
3answers
8k views

Backup files with tar command and progress bar? [duplicate]

Can I see a progress bar or something not only ust the terminal screen output while backing up? Here is my shell script that I used backup with tar command: # !/bin/bash DATEJOUR=$(date +"%Y-%m-%...