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
1answer
46 views

Using tar for backup; can I run it to show ALL the errors before backing up?

I am trying to use tar to backup but keep getting the error that it's "exiting due to previous errors." The solution is to (obviously) exclude the offending files/dirs with --exclude, which I am ...
0
votes
2answers
65 views

Unable to get files from the find results into a tar file

Below is my find command that searches and dumps the searched file results to /tmp/findall.log find /app/test -type d \( -name logs -o -name 'logs*' -o -name 'tmp*' \) -prune -o -print | tee /tmp/...
0
votes
2answers
51 views

How to create compressed archive split into multiple files while low on space

I'm to backup 7GB on 9GB drive. Means, I have about 2GB of empty space only. But tar related solutions require first - get everything into 1 file, next - split it. Is there any possibility to ...
1
vote
1answer
39 views

Install software from all subdirectories

I'm somewhat new to Ubuntu and I installed it to do a small project. I extracted about 30 tar archives with packages in them and now I have a lot of directories, each containing the source code and a ...
-2
votes
1answer
59 views

How to install multiple tar archives from a .tar tarball?

I am just getting started with Linux from scratch and there is a long list of packages that need to be installed. I headed over to one of the official mirrors to download one .tar archive of all the ...
1
vote
2answers
211 views

How would I turn my absolute path into a relative path using Tar?

This is going to my files on the computer, but my teacher is going to need to compile it on his too. Here is the code so far. I am trying to compress three files into one TAR File. #!/bin/bash dd ...
0
votes
1answer
74 views

Why does the PIGZ produce a different md5sum

I observe that when I use PIGZ version, generated tar file's md5sum hash is different than the next one generated. Instead of PIGZ=-n if I use GZIP=-n generated hashes are same. I have followed ...
0
votes
1answer
93 views

Inspect (rpm -qp) multiple RPM files, each bundled in different TAR files

I was wondering the possible best time case solutions to extract each RPM files from a list of TAR bundle and get the package information from those files. So, I have a list of tar bundles in a ...
2
votes
2answers
75 views

Loop through folders and count files in TARs

I need to go through folders and count files in TARs with same name. I tried this: find -name example.tar -exec tar -tf {} + | wc -l But it fails: tar: ./rajce/rajce/example.tar: Not found in ...
0
votes
0answers
232 views

Doing incremental backups of a minecraft server with large 6GB-15GB sqlite database files amongst the server files

I am running a minecraft server on a VPS somewhere in Canada. I am using rsync to sync the server files from the VPS to my PC. That works fine and nice. However I want to make tar.gz archives of the ...
0
votes
1answer
45 views

How to untar in a version agnostic way?

I want to repetitively untar a file which I often download in new versions; for example: cd download_directory myFile-1.99.tar.gz # Version 2.x might be released next day or next week or next month; ...
0
votes
1answer
638 views

tar (child): : Cannot open: Is a directory

I know thats a pretty dumb question but I didn't found this precise question on internet I try to tar -cvjf all the contents of a directory (/*) and directly redirect that to a file (> file) but ...
0
votes
1answer
140 views

Is there such thing as an .rsyncignore file

Just like with tar and npm and commands like that, I am looking to use an ignore file like: .myrsyncignore like: rsync -r --exclude='.myrsyncignore' ./ tmp/foo instead of having to ignore ...
0
votes
1answer
27 views

tar error when including a dotfile

I need to tar some files, where one is a dotfile. FILE1=/tmp/foo/.env FILE2=/tmp/foo/docker-compose.yml FILES="${FILE1#/} ${FILE2#/}" tar -C / -cf /tmp/foo/files.tar "$FILES" The variable ...
0
votes
0answers
210 views

Stream multiple huge .tar.gz files into one file

I have a three .tar.gz files, and I need them all to be compressed into one .tar.gz file. After some googling I found the --concatenate option for tar, but that requires the files to be uncompressed ...
3
votes
2answers
3k views

How to download tarball from Github

I have this: curl -L "https://github.com/cmtr/cp-go-api/tarball/$commit_id" | tar x -C "$project_dir/" I am just trying to download a tarball from github and extract it to an existing directory. The ...
-1
votes
1answer
185 views

what is the best approach to Join Tar files after Splitting [closed]

we have the following files , that we split from huge tar file linuxaa linuxab linuxac . . . note - we have only files with linux[a-b][a-z] and linux-xxxx or linux_xxx , but we want to compress ...
0
votes
1answer
191 views

how to check if tar file is corrupted

I use the following cli in order to uncompressed tar file tar xfz centos7-rpm.tar.gz -C /var/www/html is it possible before uncompromising , to check the tar file - if tar file is corrupted or ...
1
vote
1answer
66 views

Sum the total number of lines of code in all tar files in all subdirectories

I would like to calculate the sum of the total number of lines of all tar files in all subdirectories. Consider the following example directory, se-example: se-example ├── directory1 │   ├── ...
0
votes
2answers
833 views

Archive multiple zip files into one file

How can I combine multiple existing zip files into a single file? I'm asking because I have many PDFs to zip, and I want to leverage parallel to save time in zipping them all up (as in ls ./*.pdf | ...
0
votes
1answer
133 views

restoring root_partition.tar.gz

I used tar -cvpzf root_partition.tar.gz --exclude=/root_partition.tar.gz --one-file-system / on a remote system following the information here https://help.ubuntu.com/community/BackupYourSystem/TAR ...
0
votes
1answer
51 views

root_partition.tar.gz 1.3GB -> 140GB+ when unzipped

I asked a friend to make a full backup of a Ubuntu 16.04 LTS server and he created this 1.3GB root_partition.tar.gz file on the server itself, but when I try to extract it on Windows 10 with 7-Zip to ...
0
votes
2answers
78 views

How do I grep out of every tar archive on a system using 'find' and -exec 'tar'?

The command I'm trying (as I'm trying to find tars with 'butterflyinmotion.com' as a dir in them) is: find / -name "*.tar.gz" -exec tar -tzf {} \; | grep -W butterflyinmotion This shows a lot of ...
5
votes
2answers
308 views

How to extract a tar.gz file to two destinations concurrently?

I have some tar.gz files. I need to extract these tar.gz files to two USB harddisks. With the command tar -xvzf I can only extract the tar.gz to one harddisk at a time. Grateful if I can be advised ...
0
votes
3answers
322 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
303 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
191 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
113 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/ ...
2
votes
3answers
891 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
91 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
216 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
385 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
53 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
27 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
266 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
82 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
84 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
50 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? ...
2
votes
1answer
145 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
179 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
75 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 ...
1
vote
1answer
87 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 ...
2
votes
0answers
235 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 ...
4
votes
2answers
622 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
150 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
289 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
856 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
54 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
51 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 ...

1 2
3
4 5
22