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

learn more… | top users | synonyms

1
vote
1answer
14 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
52 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 ...
90
votes
8answers
9k 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
757 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
2k 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
6k 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
39 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 ...
1
vote
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
184 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
20 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
46 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
29 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 ...
3
votes
3answers
7k 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 ...
0
votes
1answer
917 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
2answers
55 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
41 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: ...
1
vote
2answers
56 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 ...
0
votes
1answer
23 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
177 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
0answers
10 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
176 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
54 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 ...
2
votes
2answers
65 views

Linux + how to compress the old log files automatically

Under /var/log/httpd folder, files are created with huge capacity!!! What solution can I use in order to compress the old files automatically (can logrotate handle this)? If yes, how to configure ...
5
votes
2answers
378 views

Is it possible to add error correction codes (BCH, RS or etc.) to a single file?

As far as I know, WinRAR archives may contain ECC (error correction codes), so if the archive is slightly damaged, then it can be fixed by itself. For example, I can first encode archives.tar to ...
14
votes
6answers
21k 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 + ...
0
votes
2answers
28 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
46 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
65 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. ...
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
44 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 ...
6
votes
4answers
36k views

How do I extract with tar to a different directory?

This doesn't work: tar xf /tmp/foo.tar.gz foo/bar tar: foo/bar: Not found in archive It's not obvious to me what would do this beyond extracting it in place and moving the files over.
4
votes
1answer
37 views

unpacking tarball with hard links on a file system that doesn't support hard links

I got a tarball (let's say t.tar.gz) that contains the following files ./a/a.txt ./b/b.txt where ./b/b.txt is a hard link to ./a/a.txt. I want to unpack the tarball on a network file system (AFS) ...
2
votes
2answers
2k views

How do I dereference links when extracting from a tar file?

If I have a tar file, bob.tar, which contains real_file and link_to_real_file, in which the latter is a symlink, is there a way to extract the contents of bob.tar so that link_to_real_file will not be ...
1
vote
1answer
51 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 ...
9
votes
4answers
30k 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
30 views

splitting a tar

I was tossed into Linux at work and have no experience with it what so ever. The guy that's training me gives me little tasks to figure out as I go, and I'm stuck. Today he told me to tar a file and ...
2
votes
3answers
56 views

Unable to use tar to run an archive through bzip2 compression

I am having difficulty compression an archive with bzip using tar. The archive I have is user-logs.tar. I am attempting to run this: tar -jf user-logs.tar I get this error: tar: You must ...
5
votes
7answers
16k views

tar files only, no directories

I can probably write a shell script to find files only, then pass the list to tar, but I am wondering whether there already is a built-in feature in tar that allows doing just that, in a single ...
0
votes
1answer
28 views

Why doesn't `tar --exclude` take multiple options?

Looking at the man-page for tar it's stated that --exclude=PATTERN will " exclude files, given as a PATTERN ". I'm not sure if PATTERN is explained in more detail somewhere else, but why does the ...
0
votes
1answer
59 views

Why does my tar not work? [closed]

I want to install a teamspeak on my root server, but after downloading the tar file, I cannot extract it. I use the command tar -xzvf teamspeak3-server_linux_amd64-3.0.12.2.tar.bz2 I also know ...
2
votes
2answers
82 views

sudo tar changes extracted files ownership to unknown user

I am running this command: $ sudo tar xvzf nexus-latest-bundle.tar.gz The extracted files belong to an unknown (1001) user: drwxr-xr-x 8 1001 1001 4096 Dec 16 18:37 nexus-2.12.0-01 ...
15
votes
5answers
7k views

tar extraction depends on filename?

I often download tarballs with wget from sourceforge.net. The downloaded files then are named, e.g ...
1
vote
1answer
81 views

How does one remove a tar-installed Node.js from CentOS 7?

A CentOS 7 server has v0.12.7 of Node.js installed, and the installation was done using a tar. This is leading to conflicts when I try to install a more modern version of Node.js using yum. What ...
2
votes
1answer
534 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 ...
7
votes
3answers
6k views

Tar a folder without .git files?

If I tar a folder that is a git repository, can I do so without including the .git related files? If not, how would I go about doing that via a command?
13
votes
9answers
3k views

Memory problems when compressing and transferring a large number of small files (1TB in total)

I have 5 million files which take up about 1TB of storage space. I need to transfer these files to a third party. What's the best way to do this? I have tried reducing the size using .tar.gz, but ...
0
votes
1answer
32 views

How to issue a tar command when you restore your system

I've recently created a tarball backup of my Ubuntu system (/ and /home partitions both ext4). When I was creating a backup I booted off Live DVD and I used a tar command. Now I wonder which would be ...
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 ...