Questions tagged [tar]

An archive file format (and the program that reads it) commonly used on Unix and Linux.

Filter by
Sorted by
Tagged with
1
vote
2answers
43 views

Tar extract a stream of tar files

I've got a binary (lets call it displayFiles) which will get several tar files at once and print the tars to stdout. I then pipe the stdout to tar. This works fine when the binary only downloads a ...
0
votes
0answers
6 views

Archive all files with specific extension without full structure [duplicate]

I'm trying to tar all .log files in /var/log directory. But i need to tar only the files without the directories names i have done this so far : sudo find /var/log/ -name '*.log' | sudo xargs tar --...
0
votes
0answers
25 views

tar.xz fails with _ in file name

I have a .tar.xz archive with a few videos / images, but when I extract it, I get the following error: tar -xvf archive.tar.xz vakantie/ vakantie/2018/ vakantie/2018/winter/ vakantie/2018/winter/dag 1/...
0
votes
1answer
48 views

Decrypting tar archives with gpg -d, the -d flag does not work

My OS is Ubuntu 20.04.2 lts. I am creating a tar archive from the dir noup1, that contains files and subfolders, with tar cf no1.tar noup1 Encrypt it with gpg -c no1.tar. So now I have a no1.tar.gpg ...
238
votes
3answers
57k views

Why are tar.xz files 15x smaller when using Python's tar library compared to macOS tar?

Context I'm compressing ~1.3 GB folders each filled with 1440 JSON files and find that there's a 15-fold difference between using the tar command and Python's built-in tarfile library on macOS or ...
0
votes
0answers
116 views

Mac: “tar: Error exit delayed from previous errors.”

I have a website backup that was created in cPanel and I'm trying to uncompress the .tar.gz on my Mac. I'm getting this error: tar: Error exit delayed from previous errors. I tried to use Archive ...
0
votes
0answers
8 views

tar in pipe with gpg in remote mounted volume occupies space on root / partition

I wrote a code which scope is creating a tar encrypted with a password using gpg and sending it on a mounted remote volume. tar --hard-dereference -cvzf - -C $filedir $basename | gpg -c --batch --...
0
votes
2answers
192 views

Uncompress .tar.gz format getting error “tar: Unrecognized archive format”

I've downloaded a ".tr.gz" file with a size of 10 GB from here (after downloading completed, I renamed it and deleted .partb to become dataset cleaned.tar.gz) while I'm trying to uncompress ...
0
votes
0answers
9 views

unable to list content of tarball in tree format which again contains tarball inside it

As one can see I have one tarball named xyz.tar .Inside it there is another tarball named abc.tar and one folder named pqr . I want to show it tree format.Also abc.tar too in tree format. I used ...
0
votes
0answers
13 views

Copy file system hierarchy partially from one drive to another and make tar package in simple way

Basically I want to do upgrade the filesystem of the current filesystem present in the linux based microcontroller. But problem is I don't want to upgrade it fully but most of the files . File system ...
0
votes
1answer
47 views

Which Folder to File method compresses the most? zip vs tar.gz vs tar.bz2 vs tar

I'm trying to download a large Gitlab repo in a script, and Gitlab offers each of the zip, tar.gz, tar.bz2 and tar options, and I want to pick the one that will have the smallest file size. Will one ...
0
votes
1answer
33 views

Creating GPG encrypted tar.gz Backup fails

I hope this kind of question is ok here ;) I am on Debian 10 Buster, trying to create an (GPG) encrypted, compressed tar file without intermediary files. I found this article[1] on the web which ...
1
vote
0answers
59 views

extract zip file and delete by batch

I want to unzip all the .zip files in a download directory like "D:\Download", and then the zip files should be deleted after the contents have been extracted to a folder with the zip file ...
0
votes
0answers
12 views

Optimize time when creating archive

Currently, I am using the following command to create an archive with files older than 7 days: find /var/tunningLog/ -type f -mtime +7 -print0 | tar -czf "/var/tunningLog/$(date '+%Y-%m-%d').tar....
0
votes
0answers
12 views

Use tar -czvf command to create zip file, but when I open zip archive there is file without extension

I Use tar -czvf command to create zip file, but when I open zip archive there is file without extension. The problem is when I copy this zip file to USB flash drive it gives me this error - Please ...
1
vote
0answers
20 views

How do I choose a directory name during zip on Linux?

Tar works fine: tar -zcvf cli-layer.tar.gz cli_layer --transform s/cli_layer/python/ ls -al drwxr-xr-x 3 alexb alexb 4096 Dec 16 16:38 . drwxr-xr-x 4 alexb alexb 4096 Dec 16 16:40 .. drwxr-xr-x 6 ...
1
vote
1answer
16 views

Compare folder with tarball

I have a directory structure like this Code ├── cse701.tgz └── cse701 ├── cse701.md ├── CSE701.md ├── CSE701_pandoc.md ├── cse701.pdf ├── cse.pdf ├── default.yaml ├── ...
0
votes
0answers
14 views

Restore WSL environment from C:\Windows.old

So, in the usual Windows fashion, I had a boot-loop problem, big whoop. Reinstalled windows, fixed the problem, except that now my WSL data is trapped in C:\windows.old\Users\<user>\...\...
0
votes
1answer
234 views

How can I count the number of files inside a tar.gz file (don't want to decompress)

I have a tar.gz file (neatly 1TB size). I want to count the number of files inside this tar.gz file. I used the following command tar -tzf file.tar.gz but it only lists the file name while I need the ...
0
votes
0answers
40 views

Why does gpgtar give no such file or directory, when the encrypted file was inside a directory

Reproduction details: mkdir foo touch foo/bar.txt gpgtar -c -o foo.gpg foo/bar.txt # Type in passphrase "foo" twice gpgtar -d foo.gpg Error: gpgtar: gpg: AES256 encrypted data gpgtar: gpg: ...
1
vote
1answer
28 views

Strange tar archive

I have few files that were transferred from another server. The files suppose to contain archive of directories with code and data. files have .tar extension. When I run: tar -xvf xxxxx.tar I get the ...
0
votes
0answers
9 views

Tar --dereference with --listed-incremental not working as expected

I'm developing a simple incremental backup script, however the incremental part isn't working. The used command is: tar --create --atime-preserve=system --dereference --preserve-permissions --verbose -...
1
vote
1answer
97 views

Transfer a directory over ssh with sudo

I am trying to transfer a directory from a remote server(CentOS) to my local machine(Ubuntu) over ssh. There are two users : A and B. User A can ssh into remote server and has sudo access. User B owns ...
0
votes
0answers
28 views

tar & split remote files saving output locally remove “tar: Removing leading `/' from member names” message from output

This is a 2 part question. Ive made a bash script that logs into a remote server makes a list.txt and saves that locally. #!/bin/bash sshpass -p "xxxx" ssh user@pass ls /path/to/files/ | ...
1
vote
1answer
62 views

My Tar backup has the wrong permissions

I'm on Debian Sid, using GNU tar and I want to make a backup of a system directory root@debian:/usr# ( cd /usr ; tar cf - ./share ) | ( cd /home ; tar xf - ) but some of the directories extracted ...
2
votes
2answers
893 views

How to convert .tar.gz to .tar.xz?

How to convert .tar.gz to .tar.xz? I have a bunch of .tar.gz files that I would like to convert to .tar.xz for a better compression. How to do this efficiently? A command like this would be great: How ...
1
vote
1answer
43 views

Difference between [ tar cvf archive.tar * ] and [ tar cvf archive.tar . ]

Difference between tar cvf archive.tar * and tar cvf archive.tar .. Is there any difference in the archive produced? I couldn't find anything when I googled this.
0
votes
0answers
30 views

Back up directory with symbolic links from a Unix server to Windows 10 PC

I have a directory with a few terabytes of data on server A (unix system, with many symlinks) that I want to back up to my PC (windows 10 system) as my access to server A is going to end soon. In the ...
0
votes
0answers
32 views

rsync + archivemount on WSL2 doesn't synced into the .tar file

Since WSL 2 introduced FUSE, I'm trying to rsync into a mounted tar using archivemount. However, the files are synced literally to /mnt/i, not the archive itself. Why is that? archivemount /mnt/d/test....
0
votes
1answer
23 views

How do I download and extract a tar in one command, while extracting only a single file to a specific location?

I'm trying to accomplish what it says in the title ... but for the life of me I can't figure out the magic invocation. The LLVM archive I am downloading contains the path clang+llvm-10.0.0-x86_64-...
0
votes
0answers
15 views

Combine diff between binary files a.tar and b.tar, to a.tar on different machine to create b.tar

I have two binary files, yesterday.tar and today.tar on a machine-A. The two files should be pretty similar (I did hexdiff, and they look very similar). I have another machine (machine-B) with "...
0
votes
0answers
65 views

Archive a big folder with large number of smaller and big files

I need to archive a folder from normal drive into tape in organization data storage and might retrieve them in the later stage. My scenario is a large folder with size from 10 GB to 300 GB The folder ...
0
votes
1answer
58 views

Unable to open .tgz file

using a Mac, downloaded a file 'circos-0.69-8.tgz' and tried to untar using the following command - tar xvfz circos-0.69-8.tgz And I get the following error: "Error opening archive" Failed ...
1
vote
0answers
13 views

How does 7-Zip determine tar file order on Windows?

For unix-like systems, tar uses readdir(). What does 7-Zip use on Windows to determine tar file order?
0
votes
1answer
275 views

Extract tar.gz file to a directory and create the directory if not exist

I know that I can run $ tar xf somefile.tar.gz -C somedir to extract the tar.gz file to somedir, but it requires somedir exists first. Is there a way to extract to a directory and create the ...
0
votes
1answer
103 views

tar does not do anything at all

I have a large tar file. I'm trying to decompress it using Ubuntu Server. This is what happens: ubuntu@***-***-**:~$ tar xvf myfile.tar ubuntu@***-***-**:~$ The tar is not unpacked, there is no error ...
0
votes
0answers
185 views

Issue Installing JRE 9 on Kali Linux

I tried running the app burp suite, but I got an error saying that I needed the next version of JRE. I followed the instructions on this page: https://docs.oracle.com/javase/9/install/installation-jdk-...
0
votes
1answer
113 views

Why don't or can't Windows archive programs list tar.gz files directly?

I see all Windows archive programs first list one tar file in tar.gz, not compressed files contained within. So I double click the tar file and the program extracts the tar in a temporary folder and ...
-2
votes
1answer
38 views

I want to tar gz file of the month of January

-rw-r--r--. 1 root root 4788074 Jan 1 01:50 2020-01-01-00-50-18.done.csv -rw-r--r--. 1 root root 4842864 Jan 1 02:50 2020-01-01-01-50-18.done.csv -rw-r--r--. 1 root root 4923486 Jan 1 03:50 ...
2
votes
2answers
1k views

7zip has problems extracting POSIX tar archives due to @PaxHeader files

POSIX tar archives contain POSIX headers as "dummy" files named @PaxHeader. 7zip dutifully extracts them, and they all collide, since they are all named the same. 7z then complains about the file ...
0
votes
1answer
63 views

Prevent tar from overwriting tarball

I accidentally ran the same command twice: tar --remove-files -cf ../2019-09.tar *2019-09-* The second invocation replaced the tarball containing my data with an empty one, even though it died with ...
0
votes
0answers
121 views

Showing a tqdm progress when extracting a tar in linux

I have a heavy tar.gz file for which I want to show a pretty tqdm progress bar. The tqdm docs shows how to do that when creating a tar: tar -zcf - docs/ | tqdm --bytes --total `du -sb docs/ | cut -f1`...
0
votes
1answer
33 views

Tar restore syntax to only restore UNhidden files

What is the proper syntax for only restoring files that are NOT hidden? I'd like to copy those by hand, as needed, without bulk overwriting anything that's already there. So for example, I'd like to ...
1
vote
1answer
36 views

Tar restore with removal of pathname components

I use tar about once every 10 years and made a backup off a failed inaccessible drive that luckily worked fine. Except that instead of backing up just /home (and everything under it), it backed up /...
0
votes
0answers
66 views

Unable to unzip Yelp dataset

I've downloaded the latest Yelp dataset (yelp_dataset.tar) and am unable to unzip the file. I get the following error: "Invalid archive header found in yelp_dataset.tar". I've tried changing to .zip ...
3
votes
2answers
2k views

How do I execute a dry run of a tar compression?

I want to execute a dry run of a tar compression and print the entries to stdout without actually creating the tar. So far I've tried: // just spins $ tar t -O Downloads $ tar c -O Downloads tar: ...
0
votes
1answer
730 views

How to update tar to version 1.30+ in Ubuntu 16.04?

I work with the gitlab-ee docker image to install my local gitlab. This docker image has the OS Ubuntu 16.04 and can be found here: gitlab/gitlab-ee in hub.docker. Within these image tar in version 1....
0
votes
1answer
49 views

Copying files using shell Scripting [closed]

hellow guys, please i need a script shell that can copy files from server to another using SCP. and put the files in temperory folder then copy from tmp to destination /product/serv/nep/ in case if ...
0
votes
1answer
29 views

website backup via cron job and “file changed as we read it” issue

I'm creating scheduled backups of a website (i.e. its "public_html" folder) via cron job and the first action is to compress that folder into a tar.gz backup ("public_html_date.tar.gz"). Sometimes I ...
0
votes
1answer
37 views

disk full after a interrupted tar command

I'm working on Ubuntu 18.04.3 I ran a tar command to compress some files (I used wrong arguments by the way) tar -cvf rep_to_files/* archive.gz The amount of files was something like 13Go. The ...

1
2 3 4 5
15