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

learn more… | top users | synonyms

1
vote
2answers
70 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
14 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
91 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
50 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
52 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
53 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
96 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
63 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
57 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 /...
0
votes
1answer
31 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
2answers
106 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 ...
2
votes
3answers
80 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 ...
4
votes
1answer
72 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) ...
0
votes
1answer
66 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 ...
0
votes
1answer
31 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 ...
2
votes
2answers
197 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 ...
1
vote
1answer
178 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 ...
0
votes
1answer
37 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 ...
-1
votes
2answers
55 views

How to create a tar of directory structure

I want to copy the directories into another server; however don't need to copy the files of the directories. So a tar of empty directories is the one that I am looking for.
0
votes
1answer
48 views

“a” showing up with files during tar archiving

While I'm archiving the file in my local system, I see an "a" at the beginning of the files while compressing. tar -zcvf database.tgz database/ a database a database/GeoIP2-City.mmdb a database/...
2
votes
3answers
461 views

AIX tar error: There is not enough memory available now

I have an AIX P720 server running AIX 5.3. When running tar -xvf /dev/rmt0 extracting from tape (IBM TS3100 Tape Library), I get the following error: "There is not enough memory available now". It ...
1
vote
0answers
28 views

Tar waiting a long time at end of block device

I had some trouble getting Linux installed to a particular netbook and had to restart it from scratch multiple times. Re-typing the same commands to set up networking and bootstrap the install was ...
0
votes
1answer
55 views

How to “Find” then “Rsync” then “Tar/gz” on destination host?

I have a Cassandra node with snapshots broken up into 64 directories with over 350 files per directory. I want to "find" all snapshot files, preserve their location, rsync them across to a host with ...
1
vote
0answers
43 views

How to 'snapshot' a chroot?

I want to perform something similar to a 'clone' on vmware fusion/virtualbox/a VM manager. Host and chroot are both ubuntu. One complicating factor may be that this chroot may have one or more child ...
1
vote
0answers
105 views

How to make tar to ignore last-modified-time of files/directories

I'm using tar to backup a directory. Some files/directories' last-modified-time will be updated but the content remains. I would like to get a tarball with the binary if the directory files' content ...
0
votes
2answers
26 views

Does the untarred folder overwrites or appends the contents of the original folder? [duplicate]

I have a x.tar.gz as a backup which has the following contents: .htaccess a.html b.html c.html x.html I have also a ./x directory, already existing, which has the following contents: .htaccess a....
0
votes
1answer
26 views

Not able to see the backed up file in the backed up media

I used 2 commands cpio and tar to perform the same operation of backing up data to an external drive which is my 8Gb pen drive (sandisk brand). At the time of executing the commands, it outputs ...
6
votes
3answers
448 views

tar extraction also automatically decompresses

When I run tar -cvzf archive.tgz file1 file2 ; rm file1 file2 it normally creates a compressed tarball, but how is it possible that tar -xvf archive.tgz gives me back the uncompressed files? I'...
0
votes
2answers
157 views

tar “--exclude-from” double star wildcard

I wrote a backup script on my Debian 8 system which uses tar command with "--exclude-from" to exclude some files/dir. This works great, but today I would like to exclude some files sharing the same ...
0
votes
1answer
49 views

Compress mtdblock with 'tar' before sending it via TFTP

what is proper command compress mtdblock with 'tar' before sending it via TFTP? tftp -l /dev/mtdblock3 -p 192.168.100.40
0
votes
1answer
42 views

Tar files in order

I am taring files using this script tar -cvf test.tar -C /home/user/Desktop/filestoTar File_one zap_file tar -rvf test.tar -C /home/user/Downloads/test Auto_file rocket_file And I want to untar ...
1
vote
4answers
83 views

Avoid the contents of a .tar begin with './'

I want to make a backup of a directory using tar and xz, but I have a problem. When I open the file, all the files and directories begin with ./ and I don't want this to happen. file.tar.xz |---- ...
5
votes
1answer
2k views

“invalid tar magic” on OpenWRT

I'm trying to install JavaSE on a OpenWrt (Pandorabox) device. When I run tar -xvf ejdk-8u65-linux-arm-sflt.tar.gz I get tar: invalid tar magic. How can I solve this problem?
1
vote
2answers
76 views

Can I download tar.gz file while it is being compressed?

I am compressing a huge directory which could be more than 10 GB, It takes time to compress it. But at the same time, I have to download this to another new server. So while the compressing is going ...
3
votes
1answer
76 views

Rsync contents of tar with remote server

I've got a number of backups as tar archives, and to do checking/testing of them I restore to some test machines using: cat archive.tar.gz | ssh server2 "cd /path/to/dir; tar zxvf -" Most of the ...
0
votes
0answers
42 views

Unix -untar files only looping one time - C-shell

I have list of *.tar.gz files that I want to unzip and untar at once. The code: foreach summ (`ls *.tar.gz`) gunzip -d < $summ | tar xf - end But only one file has been untarred. How would ...
0
votes
1answer
69 views

Thunar custom action: Extraction to subdirectories

I am attempting to create a Custom Action in Thunar (File Manager) that will extract a gzip archive into a subdirectory of the same name (e.g. abc.tar.gz to abc/). I created this command, which works, ...
0
votes
1answer
44 views

how to make TAR of selected files in directories

I have below paths in my system /a/b/z /c/d/ /e/f/z /y/g/ In "z" directory there are some files i just want to make tar of that files without going into directory .
1
vote
0answers
56 views

Archive for root file system with quick random access

I need file archive format with the following features It is compressed (not plain tar or iso). It can backup (and restore) linux root file system keeping owners, symlinks, sparse files, devices, ...
2
votes
1answer
542 views

passing variables from 'ls' to 'tar' via 'xargs'

I am trying to do something like ls -t | head -n 3 | xargs -I {} tar -cf t.tar {} to archive the 3 last modified files but it ends up running the tar command separately for each of the files and at ...
0
votes
1answer
40 views

How to recover a node/content from a tarfile that's been overwritten

Disclaimer: I'm not very good at writing questions, and mine is a very specific scenario. So I'm just going to jump straight into the situation: I was browsing my filesystem, and somehow managed to ...
0
votes
1answer
51 views

filename.gz installation on AIX

I use sudo tar xvzf forwarder.tar -C /opt/ on Linux and this works perfectly then I proceed with a . /splunk start to install a forwarder file. While in AIX, its forwarder is in .gz format and ...
0
votes
1answer
379 views

why would you tar a zip file

I see here that a tar is used to merge several files into one. So why do I see so often one zip file in a tar? example : archive.zip.tar
0
votes
2answers
101 views

Tar big files in different directories

I have ~20 files, each about 10 GB in size, in different folders that I need to compress into a single tar. It is not practical to copy them all to one location. More precisely, the files are ...
2
votes
2answers
154 views

How can I check if a directory contains the same files of a TAR archive?

Let's say I have a folder Documents and a TAR file Documents.tar, how to check if the tar file contains the same files that are present in the directory? The more obvious solution to me would be to ...
33
votes
4answers
2k views

How to untar safely, without polluting the current directory in case of a tarbomb?

Respectable projects release tar archives that contain a single directory, for instance zyrgus-3.18.tar.gz contains a zyrgus-3.18 folder which in turn contains src, build, dist, etc. But some punk ...
3
votes
3answers
602 views

How do I pipe the output of tar through mv?

A previous question of mine asked how to pipe downloaded files through tar, now I would like to know how to pipe the output of tar through mv. See I have this command at the moment: wget -c https://...
1
vote
1answer
285 views

How to convert tar.bz2 to .bz2?

I have a file with compression tar.bz2 , I would like to convert it to .bz2 . Is there a command that does this in one shot? I tried the below but no joy ! tar -xvjf US.tar.bz2 US bzip2: ...