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

learn more… | top users | synonyms

0
votes
0answers
8 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 ...
8
votes
2answers
230 views

tar to pipe but keep -v verbose output separate from STDERR

A normal tar command tar cvf foo.tar ./foo >foo.out 2>foo.err has three output IO streams archive data to foo.tar list of filenames to STDOUT (redirected into foo.out) error messages to ...
0
votes
1answer
18 views

Tar Create and Split files into subdir

I have this command: tar -cf - input/* | split --bytes=1m Which splits my huge gz files into small ones. This works fine. However I want the output (the small files) to be created in the input/ ...
3
votes
2answers
40 views

Tell gzip/bzip2/7z/etc not to compress already-compressed files?

I'm tarring up /home, and piping it through bzip2. However, I've got lots of already-compressed files out there (.jpg, .mp4, .mkv, .webm, etc) which bzip2 shouldn't try to compress. Are there any ...
4
votes
1answer
155 views

how to run a software in linux without installing it

I am trying to run Rstudio download page link. On my Windows machine, I just downloaded the zip file from zip/tarballs section and was able to run .exe without installing anything on my machine. I'd ...
-3
votes
1answer
89 views

How to compress a single huge file (e.g. 200GB) file from command-line [closed]

I'd like to compress one huge file (~200GB) from the command line. no need for archiving its directory along with it, swift operation and high compression ratio preferred. What may be some good ways? ...
0
votes
1answer
20 views

How to create backup from symbolic links and from files, too?

I would like to archive some directories. These directories are contain some softlinks. I should keep these links and files, too. I didn't found any solution... I tried tar with -h option but it ...
4
votes
0answers
36 views

How to display progress bar for tar incremental archives?

While creating a level-0 archive I can do this: tar -cf - . | pv -s $(du -sb . | awk '{print $1}') | gzip > out.tgz But in case of a level-1 (incremental) archive, I don't know beforehand what ...
1
vote
2answers
67 views

Compressing multiple files in different folders without folder structure

Currently I create a copy of my log files like this: # tar -cvzf /var/www/vhosts/example.com/httpdocs/myfiles.tar.gz /var/www/vhosts/example.com/logs/access_log ...
1
vote
3answers
146 views

How to tar files with a sorted order?

If you tar a directory recursively, it just uses the order from the os's readdir. But in some cases its nice to tar the files sorted. Whats a good way to tar a directory sorted alphabetically? ...
0
votes
1answer
58 views

tar command not found on rhel6

I am trying to download a file in rhel6 and use tar to uncompress it. I am running this on docker. I get a wierd error saying : /bin/sh: tar: command not found 2014/12/22 19:32:21 The command ...
4
votes
1answer
166 views

Untar a specifc folder within tar.gz

How do I untar/uncompress a specific folder within a tar.gz using the terminal/commandline (Ubuntu 14.04 (Trusty Tahr))? Precise: -file.tar.gz -- folder1 -- folder2 How to extract... ... ...
-3
votes
1answer
54 views

How to tell xargs to unpack tar into certain directory [closed]

I wrote my first script which goes: find /media/temp/test -type f -printf '%T@ %p\n*.tar.gz' | sort -n | tail -1 | cut -f2- -d" " | xargs tar -xvpf I would like to find latest modified file which ...
0
votes
1answer
39 views

Backing up Linux server to Windows domain

I'm maintaining a small Linux workstation/server in a Windows-domain-based environment. Apart from being in the same network, the Linux computer is not connected to the domain. Until now, I'm using a ...
2
votes
3answers
51 views

tar append to file in archive

Good morning, I have a tar compressed archive tar.bzip2 (created using tar jcf), which contains a file named data.txt (1). On the other side, I have another file also named data.txt (2). Is ...
1
vote
3answers
43 views

TAR Files: Move Files From Subdirectories to Main Directory

I've been trying to use this code: find documents -maxdepth 1 -type f -print0 | xargs -0 tar cvf documents.tar.gz to create a backup of the directory documents. The directory has the structure: ...
0
votes
3answers
61 views

what the best approach in order to compress directory with Hundreds of sub directories [closed]

Under /usr/cti/APP_sys, I have hundreds of directories and subdirectories and files, etc. I wonder what the best approach in order to compress the /usr/cti/APP_sys directory (get the best low ...
3
votes
0answers
44 views

Is it safe to use tar even if there are some characters other than ASCII in filenames and paths?

Is it safe to use tar even if there are some characters other than ASCII printable characters? For example, Japanese characters, Chinese characters, newline character etc. Are there any known ...
2
votes
0answers
22 views

Remove tar compress spool from cron email

I have a crontab job that call a simple script to backup a website: 15 0 1,10,20 * * /home/username/bin/backup_whatever This is the script: #!/bin/bash TODAY=$(date +"%Y%m%d") ...
2
votes
2answers
39 views

How to specify a different “top level” name for tar?

I would like to tar root (/) and let it appear as /abc in the tar archive. Is there a tar flag for specifying a custom top-level name?
3
votes
1answer
35 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 ...
2
votes
1answer
38 views

'Tar' the result of a 'find', preserving the directory structure

I want to tar all the *.txt file, that I get from the result of a find, that exist into a directory having a tree like this: Directory_name dir1 file1.pdf file1.txt dir2 file2.pdf ...
0
votes
2answers
65 views

How do you set the default behavior of tar?

I have never needed to use any other options for tar other than -cvzpf. Is there some way to set that as the default behavior? While I recognize that it is often impossible to say why someone wrote a ...
-1
votes
1answer
82 views

Scripting multi-volume (GNU) `tar` with pre-defined number of volumes

I've wrote me a little script to test (or extract) a very big multi-volume tar archive (note: created with GNU tar), each of which 00x.tar chunk will fit onto a standard DVD: #!/bin/bash d=$(dirname ...
2
votes
1answer
52 views

cpio VS tar - what the best archive solution in order to compress hundred of directories to one file

I have hundreds of directories under /var/Recording, and each directory there will have subdirectories, including files, hard links and soft links. I want to compress all directories under ...
1
vote
1answer
56 views

Why can't the tape device such as '/dev/st0' use commands like 'cp' to copy contents to it?

I got this point from a book,it says Because the tape device is a disposable I/O device,so we can't use commands like 'cp' to copy. And the author recommended to use 'tar': tar -cvf /dev/st0 ...
4
votes
2answers
165 views

creating a tar archive without including parent directory

I am trying to create a graphical program for my script. Inside the script I use tar to create a tar archive. From the graphical program I get the full name of file that I want to create a tar ...
2
votes
2answers
50 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 ...
0
votes
2answers
44 views

difference between gnu tar and tar package in fedora repositories

man page of tar in fedora (and also man page of tar on die.net) mentions the --acls and --xattrs and --selinux options but they are not mentioned in tar manual in GNU website Why? do this mean ...
2
votes
1answer
42 views

How to download latest version of cmake using tar xzf?

When I did cmake --version I got this - cmake version 2.6-patch 4
2
votes
1answer
30 views

Tar using progress bar and handling multi-volumes

I'm trying to create a tar of a large LVM volume onto multiple external drives. That part is solved. Now, because it is a LONG process, I'd like a progress bar. From the excellent articles here, ...
3
votes
1answer
141 views

Estimate the size of the extracted files before extraction a `tar.gz` archive?

Before using tar to extract a .tar.gz archive, it is possible to get an estimate of how large the extracted files are in total?
7
votes
3answers
711 views

How to recompress 2 million gzip files without storing them twice?

I have about 2 million (60GiB) of gzipped small files and I would like to create a compressed archive containing all of them in an uncompressed version. Unfortunately, I cannot just uncompress them ...
0
votes
1answer
47 views

Extracting tar.gz from distance

I would like to extract a single file from a tar.gz file, but its in another folder than I am currently in. Is it possible to extract from "distance"?
1
vote
1answer
47 views

Adding files to .tar from directory

Is there a way to add files to .tar file in one directory from an another directory? And at the same time list the content of the tar to see if its added. I only found ways to add files if its in the ...
1
vote
1answer
30 views

Fastest way to find whether a file exists in a number of tarballs? [closed]

Is there a more efficient way to do this other than using tar tf and checking the output of every file against the file that I'm looking for? This is the way I do it right now, but it's very slow ...
1
vote
2answers
131 views

command to get topmost directory name in compressed files

Filenames are ones shown below, but the directory will be libgit2-0.21-1 when tar xvf v0.21.1.tar.gz, so how use one-liner to get the directory name(report error if more than two directory exist): ...
3
votes
1answer
105 views

How to create a deterministic tar.gz using git-archive?

Creating a git repository for testing. ~ $ mkdir somefolder ~ $ cd somefolder/ ~/somefolder $ git init Initialized empty Git repository in /home/user/somefolder/.git/ ~/somefolder $ echo test > ...
0
votes
3answers
600 views

wget downloading tar.gz file as html?

I need to download this file http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jdk-7u67-linux-x64.tar.gz using wget. I use the command wget ...
4
votes
4answers
482 views

Does gzip add integrity/crc check to a .tar?

I run commands: tar -cf myArchive.tar myDirectory/ gzip myArchive.tar then I copy the file over a lot of unreliable mediums, and later I unpack it using: tar -xzf myArchive.tar.gz The fact that ...
3
votes
2answers
223 views

tar exits with bzip2: (stdin): trailing garbage after EOF ignored after extract

I have extracted a large (3.9GB) tar.bz2 file using the following command: tar -xjvf archive.tar.bz2 The extract proceeds fines but exits printing: bzip2: (stdin): trailing garbage after EOF ...
2
votes
1answer
59 views

Is archiving the entire filesystem from the root an effective backup strategy?

I am looking at my server through WinSCP and thinking I could tar the lot, save locally, then if starting a fresh identical server later down the line, re-upload and overwrite saving me the initial ...
0
votes
3answers
526 views

In the command tar –cvjf foo.tbz a b c, what are a, b, and c?

I know these aren't extra flags to be passed to the tar command, aren't they just files names to be added to the archive?
0
votes
0answers
41 views

Create tar file which consists of directories from another tar file

I have tar file with three directories, dir1, dir2 and dir3. Is there a way to extract dir2 and dir3 directories to create new tar file on the fly, without extracting the directories in temporary ...
2
votes
1answer
42 views

Compress a tar file without extracting the content

Is it possible to compress a tar file such that I don't end up with an archive file in an other archive file but just an archive file containing my content fx. a tar.gz file? I don't want to extract ...
0
votes
0answers
37 views

tar en Meme Suite

I'm new to Mac OS X 10.9 Mavericks and wanted to install a bionformatic program called Meme Suite (http://meme.nbcr.net/meme/) but I get the following errors: tar:Error opening archive Failed to open ...
2
votes
1answer
51 views

get the name of new directory that created out of tar command

How can I get the name of new directories that were crated out of tar -xvf command? For ex. When I run the command tar -xvf jdk-7u17-linux-x64.tar.gz the contents of this tar extracted in a new ...
0
votes
1answer
192 views

“tar (child): Cannot connect to https: resolve failed” when installing Bitmask

I am trying to install Bitmask on my system to get the riseup VPN running(https://help.riseup.net/en/vpn/how-to/linux), but as you can see, there are no packages for Fedora. I tried the compressed ...
0
votes
2answers
62 views

Find an archive and extract it in the directory where it is located

I want to find a tar file which is presented in any directory and un-archive it in a one line command. I am able to find it separately from home directory. but only can extract it from directory ...
4
votes
2answers
269 views

can't decompress .tgz using gunzip

I was able to archive and compress a folder with the following command: tar -cvfz example2.tgz example1 I then removed the example1 folder and tried to unpack the archive using this command: tar ...