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

learn more… | top users | synonyms

1
vote
1answer
34 views

Tar and download in one step over ssh / scp [duplicate]

(This seems like an obvious / common question, but I couldn't find it when searching - maybe I wasn't using the correct terminology...) I want to login over ssh to a remote machine, tar a directory, ...
1
vote
2answers
24 views

busybox tar or split large file to multiple smaller files

I am running Linux version 3.4.8 on an at91sam9g20. I want to take a large record and split it into multiple files. I have tried a number of methods, but none appear to function correctly, e.g. ...
3
votes
1answer
33 views

use tar to extract and immediately compress files from tarball

I have a compressed tarball (eg foo.tar.gz) that I wish to extract all the files from, but the files within the tarball are not compressed. That is to say, the contents of foo.tar.gz are ...
4
votes
4answers
137 views

tar extract into directory with same base name?

I have a ziped file like myArchive123.tar.gz. Inside it contains a folder like helloWorld If I extract it: tar -xf myArchive123.tar.gz I get the helloWorld folder: ls myArchive123.tar.gz helloWorld ...
2
votes
2answers
81 views

how to create multi tar archives for a huge folder

I have a large folder with 30M small files. I hope to backup the folder into 30 archives, each tar.gz file will have 1M files. The reason to split into multi archives is that to untar one single large ...
0
votes
1answer
22 views

make `tar` archive from NTFS with non-ascii file names

Loaded a live disk into a Windows based machine with NTFS files. Being a Linux user for some years, using tar came to my mind instantly and made some backup archives from partitions and stored them ...
3
votes
1answer
31 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
3answers
34 views

Extracting archive by piping contents of archive into the tar command

I am creating a self-extracting archive and I have got the basic thing going. However I want to set the command that extracts the archive contents tail -n+$ARCHIVE_START_LINE $0 into a variable. I ...
4
votes
1answer
24 views

How to get tar to hardlink identical content on-the-fly during archive creation?

How can I get tar (or any other program that is commonly available on Linux, e.g. pax) to hardlink duplicate content on-the-fly during archive creation? That is, I'd like to avoid hardlinking upfront ...
0
votes
0answers
29 views

Tar corrupting file attributes and skipping directories

While creating tar archives for backup purposes with 'large' numbers of files (200+), I have been repeatedly running into the following errors: tar: some/path/file.xyz: Cannot stat: Invalid argument ...
-1
votes
1answer
53 views

Generate a tarball or (.tar.gz) of the recently modified files in the directory

As the title says, I need help creating a linux script that generates a tarball or (.tar.gz) of all the files in the directory passed in as an argument to the script and have been modified in the past ...
0
votes
2answers
31 views

Is it possible to list all files in a *.tar.gz file without scanning it's whole contents?

I know this way only: tar --full-time -tvf /path/to/file.tar.gz But it makes tar to scan all the archive and it is time consuming if it is a very big one. My question is maybe there is a way to ...
0
votes
1answer
21 views

How to archive files and not entire path

I'm trying to archive specific files on diferent folders. I use this bash command: tar cf file.tar /home/albertserres/Descargas/file Inside the .tar file i have a folder named home inside another ...
0
votes
0answers
71 views

shell script prompting for password but not taking it while doing tar

In my shell script, I have following lines: function tarIt() { FILE_OWNER=$1 TAR_FILE_NAME=$2 FILE_NAME=$3 su - $FILE_OWNER -c "tar -czf $TAR_FILE_NAME $FILE_NAME 2>&1" if [ ${?} ...
1
vote
2answers
64 views

How to tar, split, pipe, untar over ssh

I'm copying large files over LAN, and I've noticed that with doing one ssh pipe, I can get around 10MB/s transfer speed. However, if I shoot off four of those at the same time, I get around 40MB/s ...
0
votes
1answer
58 views

tar unused files then delete them

I have folder with subfolders and sessions logs. I need some commands or script to tar this folder without usage files and then delete it. I have this construction, but I'm not sure if this leave ...
3
votes
4answers
556 views

tar a result of wget

I want to wget a file and tar it, in one command, I guess it is simple but I can't get it done. I tried several things. wget <url> | tar -cvz file.gz.tar - tar -cvzf file.tar `wget ...
0
votes
1answer
43 views

TAR gives error - tar: You may not specify more than one `-Acdtrux' or `--test-label' option

I am trying to make a tar ball and its throwing the error, persis1@takwa228-DEV $ tar -pcrvzf ALPHA.tar.gz https-ALPHA tar: You may not specify more than one `-Acdtrux' or `--test-label' option Try ...
3
votes
2answers
26 views

Help checking the integrity of TAR files for backup

I want make a backup of my Home directory and I've read a good method is to use the tar tool, and I think it suits me well since all I need to do is create a .tar of every folder in the Home directory ...
1
vote
1answer
25 views

Extracting the Contents of tar archive to parent directory issue resulting in creation of sub directories

I have a Tar file: testwebsite.tar I've placed it in the directory I would like to extract its contents to on my Web server which is mytestdirectory I run this command via PuTTY: tar -xvf ...
3
votes
1answer
36 views

Can tar discover the archive format when piping it in via wget?

When I have a tar archive of any format, I can use: tar xf archive.tar.xz tar xf anotherarchive.tar.gz as tar discovers the relevant format by itself. Now I want to download the archives and ...
2
votes
1answer
88 views

Uncompressing .tar.gz archive to specific directory

How does tar.gz file gets uncompressed with all contents to arbitrary directory, existing or not using tar using single line command? If it does not exists, then is created (directory). To clarify, ...
1
vote
1answer
36 views

How to replace string of the file, which is present in tar file through UNIX

I have a tar archive xyz.tar containing lots of .sh files like: 123.sh 456.sh 789.sh Every .sh file has some string content, e.g. 123.sh contains welcome to Hollywood, 456.sh contains I love ...
4
votes
3answers
510 views

Why does the specific sequence of options matter for tar command?

I was trying out tar command to make archive with .tar extension. please have a look at the following series of commands I tried: $ ls abc.jpg hello.jpg xjf.jpg $ tar -cfv test.tar *.jpg tar: ...
0
votes
1answer
20 views

Unable to extract to specific directory

I am trying to extract to file to specific directory but it doesn't produce result Operating system : SunOS Command: zcat /export/home/tceng/Desktop/temp/3.tar.Z | tar -xf - -C ...
0
votes
0answers
5 views

Generating a .img from tarball: The /dev/loop devices [duplicate]

I'm trying to make a .img from a tarball using the following script: #!/bin/bash # Packages required # dosfstools parted # Can be run on any Linux system # loop.max_part=15 must be in kernel ...
1
vote
0answers
31 views

tar --occurrence= option ignored?

Using GNU tar 1.26 on Linux, I'm looking for a way to stop processing after the N-th occurrence of a file in a .tar archive. This should work: tar --file=archive.tar --list --occurrence=1 filename ...
-1
votes
1answer
57 views

How to install stardict from a tar.gz manually ?

I have downloaded stardict-2.0.0-pre2.tar.gz and applied the extraction on it by writing: tar xzvf stardict-2.0.0-pre2.tar.gz , thereupon a new folder was created with the following content: From ...
1
vote
1answer
246 views

How to pipe scp/ssh file transfer(pull) through tar (remote->local transfer initiated from local machine)

I would like to pipe an scp pull operation(sample without tar below) through tar, so that only one tar file is written for about 10 directories: user@localhost:/home/user> scp -r ...
0
votes
1answer
43 views

How to show a progress bar while tar a folder recursively?

In bash-script execution of taring not shown a progress bar, how to show a progress bar while taring a directory?
4
votes
3answers
348 views

Unpack file compressed in .txz and .tar with one command

I have a file compressed in *.txz. After unpacking it I received a *.tar file. Is there any way to unpack it twice with one command? I mean unpack file (*.tar).txz with one command? For know I'm do ...
0
votes
1answer
40 views

Using Xargs to write a tar archive in numerical order

I need to write an LTO of single frame files (DPX) in frame number order. When using the standard command below the frames are written out of order. tar -b 1024 -cvf /dev/nst0 <directory> ...
3
votes
1answer
210 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
434 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
46 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
111 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
193 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
154 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
25 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
1answer
65 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
213 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
233 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
221 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
703 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
85 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
63 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
73 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
75 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
70 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
50 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 ...