Questions tagged [tar]

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

Filter by
Sorted by
Tagged with
0
votes
3answers
83 views

How do I tar all files without paths

I want to find all .c files in current directory and subdirectories and tar them. I try to use the following way to achieve this goal but when i unzip files, the files in different folders. I don't ...
-1
votes
1answer
77 views

Problem opening .tar.xz file [closed]

mycrap@MYCRAP:~/Downloads$ tar -xJf Pango-.36.0.tar.xz tar (child): Pango-.36.0.tar.xz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned ...
1
vote
1answer
25 views

How do I extract a .tar file on Azure File Share on Ubuntu 18.04?

I have a virtual machine in Azure running Ubuntu 18.04. On this machine, I have mounted an Azure File Share as a file share. Now I'm looking to extract a large file on the mounted drive and it fails. ...
10
votes
2answers
1k views

Make grown extracted tar file small again

I packed and compressed a folder to a .tar.gz archive. After unpacking it was nearly twice as big. du -sh /path/to/old/folder = 263M du -sh /path/to/extracted/folder = 420M I searched a lot ...
0
votes
1answer
31 views

Newly installed sytem not able to extract the tar file

I have installed ubuntu in system. mounted the drive but while extracting the tar file I am getting an error. /Downloads$ sudo tar tvzf elasticsearch-7.5.1-linux-x86_64.tar.gz /media/asd/LinuxABC/ ...
1
vote
3answers
56 views

Create archive of complete drive with tar

I want to backup my complete drive of my brand new PC. I tried this command: sudo tar -czvf disk.tar /dev/nvme0n1 But it finishes after 1 second. The nvme0n1 file in the archive is 0 bytes. What ...
0
votes
1answer
28 views

rsync with --bwlimit option over tar -b and dd combination

I am taking NFS backup using following way. tar -b 1024 -cf - . | /bin/gzip -c | /bin/dd bs=10M oflag=direct,sync of=/nfs But I read it somewhere that to throttle the rate of I/O reading the data to ...
-1
votes
2answers
42 views

how to understand tar minus

Lately I ran into a command: curl https://start.spring.io/starter.tgz -d dependencies=webflux,actuator | tar -xzvf - curl itself does not download the tgz file, since it is not wget. tar -xzvf does ...
-2
votes
2answers
78 views

tar archive folder size is more than the original [duplicate]

when i am creating TAR of a directory which contents files, the TAR archive folder size is more than the original folder size. why does it so? checking file size by using ls -ltr directoryname
0
votes
0answers
43 views

Transferring .tar files on Linux

I need to transfer a .tar folder to a remote server and because it's very large I can't unpack it on my computer and then transfer it. I am using "rsync" but it doesn't work: rsync -av folder/...
0
votes
1answer
23 views

Test for `tar` support of `--includes` versus `--wildcards` options

Some tar versions seem to support the --wildcards flag whereas others do not and support instead --includes. Does any know which versions support which, and if there is a way to test for support of ...
1
vote
0answers
35 views

Unknown character encoding for zip file in archive manager

Forenote: I am quite new to Linux, and am really just a beginner. I have downloaded a zip file from a respectable-looking site with firefox; it should contain stuff to install an application. The zip ...
0
votes
1answer
54 views

How to display only extracted files with tar, not the ones which are not extracted /not overwritten?

I'm extracting a tar archive with tar -xf /tmp/update.tar -C / -v --keep-newer-files. The -v Option is to display all files processed, the --keep-newer-files Option is self explaining. Due to all ...
2
votes
1answer
47 views

Tar: Exclude folders that have a dynamic name (using wildcard)

I have a backup routine that runs for Wordpress sites. There are folders created which are dynamic per installation of Wordpress. I cannot, for the life of me, figure out how to exclude the dynamic ...
0
votes
1answer
26 views

list directory sizes and compress them

I have a list of directories I want to compress on an ubuntu machine. Is there any tool to automatically calculate the size of the of my folders and copy the size to the name of the compressed file? ...
1
vote
1answer
51 views

Are there some common ways to catalogue tar tape backups?

So, I have a tape drive, and use it to permanently archive some stuff (old projects). These are "copy once" things, no versioning/incremental backups/etc. Though of course, new projects might be added ...
3
votes
1answer
40 views

MBR and bootstrap explanation for different size disk copy

I wish to clone a 500gb MBR source disk to a 250gb MBR destination disk manually by making each corresponding partition on the destination disk and restoring just the data contents of each. This way, ...
0
votes
1answer
37 views

How to restore backup to new disk

I have to backup /home/dev/ directory, add new disk, create LVM, mount and restore backup to the new mounted volume. It should look like this at the end: /dev/mapper/vg00-home--dev 22G 3.6G 18G ...
0
votes
1answer
48 views

Lowering ram usage with ratarmount

Question summary: Is there any way to lower the ram usage of ratarmount? What factors affect the ram usage (other than tar size)? Edit/clarification of question: What method could I use to reduce the ...
0
votes
0answers
31 views

How does the tar flag --totals interact with the -z flag?

-z, --gzip filter the archive through gzip --totals[=SIGNAL] print total bytes after processing the archive; with an argument - print total bytes when this SIGNAL is delivered; Allowed ...
3
votes
2answers
94 views

How much space does my little file take up, exactly? [duplicate]

I was under the impression that tar does not compress files. Imagine my surprise when I tar up a million small files (du -h ~ 4.2G) and the resulting tar was a quarter of the size (ls -lh mytar.tar ~ ...
0
votes
2answers
78 views

Bash script to pack roughly 1GB of files into a tar archive

I've got several folders with several thousand files, each folder roughly 3 - 10GB in size. Now, I'd like to tar those files inside the folders and each tar file should be roughly 1GB in size. ...
2
votes
2answers
54 views

How to send output of `pv` to python script, and output progress one line at a time?

I use tar to quickly copy thousands of small files which I pipe to pv to show the progress and speed of the copying. $ sudo tar c --files-from /tmp/camfilenames | pv --width 40 | sudo tar x -C /...
0
votes
1answer
186 views

mac catalina tar errors on launchctl but not when running script from terminal

I am getting an error when taring my Desktop folder using launchctl. EDIT: This error only occurs on certain folders, (i.e. Desktop). It works fine on other folders (i.e. /etc). The test.sh script ...
1
vote
2answers
49 views

List all files present in backup2.tar.bz2 but not present in backup1.tar.bz2

This lists all files in two backups, sorted by size: tar tvf backup1.tar.bz2 |sort -k3 -n >backup1_files.txt tar tvf backup2.tar.bz2 |sort -k3 -n >backup2_files.txt I'd like to list all files ...
-1
votes
1answer
46 views

Any advantage in TAR's built-in archive support?

Given the option to call: tar -cI "xz -9" -f my_archive.tar.xz my_path/ and XZ_OPT=-9 tar cJf my_archive.tar.xz my_path/ The result of both is exactly the same size. Is there a good reason to ...
0
votes
0answers
19 views

Script to automatically tar files and delete the source file?

Is there a script i can run that will automatically tar new folders and delete existing source folders and move them to a different directory>?
1
vote
1answer
29 views

How to remove compressed files while extracting an archive?

I need to unpack a big archive, but the problem is i don't have enough disc space for both compressed and extracted files. Is there option to delete compressed files from the archive right after ...
1
vote
0answers
34 views

Problem when piping stdin to tar

I need to write data (multiple files and directories) from a Google cloud storage bucket onto a Tar archive on my local disk. The directories are multiple TB, so I do not want to create the Tar ...
0
votes
1answer
182 views

Cannot change ownership to uid 1001, gid 1001: Invalid argument

I'm installing ONOS and following this guide: https://wiki.onosproject.org/display/ONOS/Developer+Quick+Start I executed the command sudo bazel build onos This will compile and assemble the ...
1
vote
2answers
40 views

Tar create archive rename root dir

I'm trying to create tar archive and rename root dir in archive. E.g. I have these files: $ tree ./repo ./repo ├── 1 ├── 2 └── 3 0 directories, 3 files I want to create an archive repo-v1.0.0.tar.gz ...
0
votes
0answers
44 views

corrupt tar.gz archive

I'm new here and I want to ask something maybe you can help me. I wanted to service my NAS and I had to download all the data that I had on it, so what I did is downloaded whole data trough webbrowser ...
1
vote
0answers
63 views

Tar.gz with specific sizes but compressed files contains zero bytes

Recently I took backup of certain folders by compressing them using tar.gz. I checked the file sizes and they looked like with specific sizes so I assumed that the files that got compressed must be in ...
10
votes
2answers
744 views

What is the easiest way to list all the user:group found in a tarball?

I'm installing some of my data from my old server to my new server. Since I had my old server for ages, I have a huge amount of legacy data with, most certainly, legacy user and group names. When ...
0
votes
0answers
25 views

Does archiving root directory archive additional mounted disk directories?

I am trying to archive a bunch of systems using tar. In order to do so, I am planning to run tar on each of the devices listed by df command's output (except tmpfs). Since the non-root devices are ...
1
vote
0answers
20 views

How to re-archive Android backup tarball properly

I have this peculiar situation where unpacking and repacking an Android backup tarball changes the entries in it, resulting in the backup file being unusable. To make things simpler for the reader, ...
-1
votes
3answers
1k views

How to overcome tar: Removing leading `/' from member names [duplicate]

My command is totally different when you compare with that command I am trying to run below command in linux Command: tar zcvf ABCD.tar.gz -T Files.txt and i am getting an error message as Error:...
1
vote
1answer
61 views

List contents of a tgz archive inside a gz archive

Bit of a weird one - I've got a honeypot running dionaea, which is a tool that consolidates any binaries that were uploaded to the device in single location (/data/dionaea/binaries). However, every ...
0
votes
1answer
56 views

tar - List of extracted files

How can I extract files from a .tar.gz archive while keeping a trace of the extracted files? For example, let's say I have the following file structure... ROOT ╠═▶ children ║ ╠═▶ joe.txt ║ ╚...
0
votes
1answer
37 views

Using tar to update archive with files from a while loop?

I have the problem listed here: Oct 2019 upgrade: pip upgrade failure · Issue #5844 · msys2/MINGW-packages: basically, pip on MSYS2 refuses to update because it sees some files. pacman -Syu basically ...
2
votes
2answers
273 views

How to repeatedly un tar files that are within the tar itself

I have a tar file that has been tar-ed many times. It follows a similar structure like this: 1000.tar | --- filler.txt (random text) 999.tar | --- filler.txt ...
0
votes
1answer
85 views

tell tar to ignore sockets - I don't want to see warnings

I have this warning message about sockets with tar: ERRO[0000] Can't add file /home/ubuntu/backup-db/.bunion.sock to tar: archive/tar: sockets not supported how can I tell tar that I don't ...
0
votes
0answers
114 views

How to mount a gpg-encrypted tar archive file?

On my laptop I actually have a folder where I store personal data which I don't want to share: private_folder ├── baz │   └── secret_file_3 └── foo └── bar ├── secret_file_1 └── ...
1
vote
0answers
22 views

How to tar a file that is opened and under concurrent writes by another process?

For example, while an application continuously writes text lines to a file named ./data.csv, i ran the following tar command: tar cvfz /tmp/1.tgz ./data.csv Though tar did create the tar ball /tmp/1....
0
votes
1answer
47 views

how to conditionally run different command with same arguments

if gtar is defined I want to use that, instead of tar: if command -v gtar; then gtar --exclude-ignore='.deployignore' -cf /dev/stdout . | aws s3 cp - "$arti_fact" else tar --exclude-ignore='....
1
vote
1answer
47 views

Zip and archive to other directory

I have some 250 CSV source files in the incoming directory. My task is to merge those CSV files and generate a file like Merge_. the Informatica Job will then pick the merge file as the source and ...
1
vote
3answers
102 views

Difference between .bz2 and .tar.bz2 files

I am supposed to find whether a file is compressed using .bz2 or .tar.bz2(without using extension of file) and and decompress it accordingly. I used the file command but it is giving same result for ...
0
votes
0answers
25 views

compressing folders with tar and trying to exclude a folder

I'm trying to get a small script to run smoothly, it's supposed to archive all subfolders under /docker/*. What I wan't is the script to exclude all folders that has a date (i e 20191010, 20180502 and ...
1
vote
0answers
48 views

How to force tar cf to have reproducable results?

Preface: We have a complex build process and discovered it's working on one system and failing on another (unfortunally/Murphy it worked on the Jenkins build server, so the problem remained ...
0
votes
2answers
70 views

How could I untar many tar files seperately with one command?

I have many tar files like this: aa.tar, bb.tar, cc.tar, .... I would like to untar them to their own directories such as aa/, bb/, cc/ ... I tried this: ls | xargs -n1 -I {} tar -xvf {} -C `...