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

learn more… | top users | synonyms

2
votes
1answer
27 views

tar archive with certain unpacking order

In order to make the unpacking process as robust as possible I would like for a tar(.gz) archive to be unpacked in a certain order so that a power outage or such is less likely to cause harm. As an ...
1
vote
1answer
32 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
3answers
84 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 ...
-2
votes
3answers
23 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 ...
2
votes
0answers
23 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 ...
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
49 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 ...
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 ...
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 ...
1
vote
5answers
59 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
46 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 ...
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 -...
1
vote
1answer
34 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 ...
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 ...
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 ...
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
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'...
3
votes
2answers
42 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 ...
6
votes
3answers
471 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
38 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
61 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 ...
1
vote
2answers
34 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-...
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 ...
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
36 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 ...
6
votes
2answers
778 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 ...
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 ...
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 ...
0
votes
1answer
55 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 ...
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 ...
1
vote
1answer
33 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 → ...
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
2answers
60 views

Why was shar written if tar already existed?

According to the BSD man pages, tar first appeared in Version 7 UNIX in 1979, but shar first appeared in 4.4BSD, which was released in 1994. What were the perceived advantages to shar at the time? ...
0
votes
2answers
45 views

Extracting a certain folder from a tarball - how do I tell it where to put the file once extracted?

I've looked around at multiple sources for this question and I know how to extract the file, but neither source told me how to state where to put the folder once it has been extracted. I tried this: ...
0
votes
1answer
32 views

Excluding files whilst using tar to zip site contents not working [closed]

I'm trying to zip the contents of a site using tar and exclude a bunch of folders and error_log files but it doesn't seem to be working, when it's processing I still see many of the excluded files ...
1
vote
3answers
1k views

tar excludes way too much

When running tar in /, how can i exclude e.g. "/sbin" while not also excluding "/usr/sbin"? Some details: It is widespread opinion that tar --exclude=dir only excludes "dir" and its subfolders seen ...
1
vote
2answers
67 views

Tar files starting with the same pattern

I have some log files named : 2016-02-10_03-52.log 2016-02-10_04-43.log 2016-02-10_02-13.log ... 2016-03-15_07-03.log 2016-03-15_09-08.log Basically the pattern is : YYYY-MM-DD_.log I would ...
1
vote
0answers
12 views

archivemount (tar) returns before writing complete (sync on write?)

I just learned about archivemount some days ago, and it sounds like exactly the solution I need for a backup problem I have with ecryptfs. However, in my tests, it seems that archivemount exits before ...
0
votes
2answers
1k views

putting files in subdirectory while making tar

I am trying to make a tar file. I have 2 folders that I need to tar. let me clear my question. folder 1. /temp1 folder 2. /temp1 now I want my tar output to be such that when i untar it i get /...
2
votes
3answers
83 views

Unzipping using tar: --exclude too greedy: how to exclude only root-level file?

I’m on a Mac, El Capitan. My zip file structure: README.md source/README.md I can’t seem to --exclude the root-level README.md without also excluding the one in the source directory too. I’ve ...
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 ...
0
votes
2answers
44 views

tar a folder given a path and store it inside another folder

I'm trying to finish a little bash project and I got stuck while trying to tar a folder given a path. For example, the program receives the route /home/folderx. Then, it looks for every folder inside ...
1
vote
1answer
50 views

tar without -f option in extraction

My question is similar to the question What does the -f parameter do in the tar command, but it pertains to archive extraction. If I issue tar x instead of tar xf mytarball.tar, is it expecting I "...
1
vote
1answer
92 views

Untar File.tar.gz from Shell w/Nested .tar

I am trying to untar a file from a shell script. There is one file within the file.tar.gz that is a tar that is not getting untared. I have tried several methods with no luck. http://stackoverflow....
3
votes
2answers
45 views

How to pin certain files when using sort?

Normally I am more creative with Unix commands and pipes, but not today. So what I have is this: collage.jpg DCIM001.jpg DCIM002.jpg or this: 001.jpg 002.jpg boston-collage.jpg or sometimes ...
0
votes
1answer
59 views

Compare and tar file for 2 date formats from filename

I need to keep files 4 months from now (3 previous month + 1 current month) in directory and tar the rest. But the problem is my files consist of different format. StockList_03-01-2015.txt Ref_01-02-...
1
vote
1answer
56 views

Where to tar entire USB flash drives?

I want to do all my archiving and compression on the command line. I have a USB flash drive located at /dev/disk/by-label/SanDiskData (which links to /dev/sdc1). I thought I could simply do: $ cd /...