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
0answers
30 views

Repairing a tar.xz file

I am trying to extract a xz archive, however, around half way through decompression I get the error Compressed data is corrupt. I have tried using xzcat and using the --ignore-check flag in case that ...
1
vote
1answer
19 views

tar --skip-old-files: Cannot open: No such file or directory

I am trying to uncompress all files in a directory. They are are scattered throughout various sub-directories, so I can't just use wildcards. Instead, I used find: find . -name "*.tar.gz" -...
0
votes
2answers
34 views

Tar command and PIPE

Let say i want to : Create a tar ball from a directory on server A Scp this tarball to a server B Untar the in the server B ssh root@serverB " scp root@serverA:/var/www/dirs.tar.gz /var/www/...
-2
votes
0answers
40 views

Error during TAR file creation [duplicate]

I'm getting this error: printf: {2..4} expected numeric value tar: -ML1900M: No such file or directory Using this code: printf 'n Log-%02d.tar\n' {2..4}|tar cf /var/opt/sw/e4/data/dev/e4_dev/DEVL3/EW/...
0
votes
1answer
56 views

Create TAR files with limited size in Unix script

printf 'n Log-%02d.tar\n' {2..}|tar cf /var/opt/sw/e4/data/dev/e4_dev/DEVL3/EW/EWD1/DATA/AED/OUTPUT/Log-01.tar -ML1900m /var/opt/sw/e4/data/dev/e4_dev/DEVL3/EW/EWD1/DATA/AED/Temp I tried to use the ...
0
votes
2answers
81 views

TAR 6 GB worth of files into separate 1.9 GB TAR files [duplicate]

I have 28,000 files of size 6.7 GB in the directory aaa/input. I need create TAR files in the directory aaa/output, such that each TAR file cannot exceed 1.9 GB, so I have to tar the 28,000 files into ...
0
votes
1answer
30 views

How to compress every file in a directory into its own compressed file (files not in current directory)

If the location DATA/AAA/INPUT contains n files (the file names are random job names), I need to create tar files for all the n files in the DATA/AAA/OUTPUT location with a common name format. So, if ...
0
votes
1answer
27 views

information about .deb installation, many errors

I want to install a tar.gz file downloaded from here. I tried but I got an error. I open the terminal in the folder and I'm trying to install. Here is a screenshot of the file manager, showing part ...
1
vote
0answers
32 views

Can GNU tar run a filter before adding a file to an archive?

I am trying to archive a directory containing many subdirectories and files, most of which are JPEG files. I would like to run each file through JPEG XL before adding to the tar archive, to reduce ...
2
votes
1answer
68 views

change directory based on file shell script

Firstly come background I am trying to write an executable shell script I can easily map as the default for .tgz files to auto-extract. so far so simple tar -xzvf $1 which works to drag/drop but not ...
0
votes
1answer
26 views

Copy file with rpm in %pretrans

How can I get a .tgz file from rpmbuild's SOURCES directory within the %pretrans section to a target system using a RPM and extract it there? I would have to do it in the %pretrans section because the ...
0
votes
0answers
27 views

How to create a deterministic tar.gz using tar? [duplicate]

I have followed following answer for Tar produces different files each time and Why does the PIGZ produce a different md5sum. My goal is to generate deterministic compressed file in tar.gz format (...
1
vote
0answers
28 views

tar.unpack untar error while installing angular in Linux vm

I am installing Angular in Linux VM (3.10.0.1062) using command npm install @angular/cli@10.0.5 from Putty terminal, getting below error [host@machinename /]$ npm install @angular/cli@10.0.5 npm WARN ...
-1
votes
2answers
32 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....
1
vote
1answer
58 views

How to check a tar.xz file to see if it's not corrupted

I have compressed some file with this command: XZ_OPT=-e9 tar cJf compressed_directory.tar.xz /path/to/directory Is there any way I could check these tar.xz files to see if they're not corrupted? I'm ...
1
vote
2answers
61 views

How to create split tar archive in multiple stages to save space?

I have a very large folder that I am trying to create a tar archive of. The issue is I don't have enough extra free space to store the entire archive so I want to create say 100-200GB chunks of the ...
0
votes
1answer
34 views

Unable to extract entire tar to a particular directory in solaris

I wish to extract /tmp/moht/104.tar to /tmp/moht/ directory ls -ltr /tmp/moht/104.tar -rwxrwxr-x 1 meadmin meadmin 933498880 Jan 5 07:03 /tmp/moht/104.tar I tried the below commands, but it ...
0
votes
2answers
39 views

tar gz a directory in another location into a destination directory

I have the following directory structure: /home/ |__dirA/ |__ dir_to_zip/ |__ file1.txt |__ file2.txt |__ ... |__dirB/ |__ dir_to_save_in/ |__dirC/ ...
0
votes
1answer
18 views

What would the value of hyphen actually look like in this instance used to refer to stdin for this archive command?

I am following a guide to learn terminal commands and have encountered the use of hyphens to refer to stdin in the following command used to find all files named 'file-A' within the directory ...
0
votes
1answer
14 views

Exclude directories with tar and pingz

I can't work out why my exclude isn't working: tar --exclude=/{dev,proc,tmp,mnt,backup} -I pigz -cf backup.gz * Gives me: root@ca1:/# tar --exclude=/{dev,proc,tmp,mnt,backup} -I pigz -cf backup.gz * ...
0
votes
0answers
33 views

cronjob creates tar file but unable to upload it

I am trying to schedule a backup script using a combination of cronjob, 'tar, and upload to an HPSS using htar utilities. I have set absolute paths in the crontab for all commands needed in the script,...
1
vote
1answer
48 views

running script with cron doesn't archive the whole directory but running the same script manually does include whole directory

link for the file showing difference between two archives Backup of dec-12 was taken through cron while backup of dec-13 was taken by running the script manually. And I haven't worked or added any ...
0
votes
1answer
18 views

Copying from EFS & Untar

I have a ~100 .tar files stored on AWS EFS, each one is ~6GB in size. I have mounted the EFS to my EC2 machine, looped over each .tar file, and untarred it into EBS. The thing is - that it takes quite ...
0
votes
2answers
36 views

Simple tar extraction failing with file not found

I have a tarball called playground.tar with the following file: test.txt When I extract everything there is no problem but when I try and extract a single file it throws the following error when I run ...
2
votes
2answers
103 views

got “tar: /path/to/my/dir: Not found in archive” error while verifying created archive

I did compress a directory to .tar.xz archive format with this command: tar --create --verbose --file myArchive.tar.xz /path/to/my/dir then,I tried to check health of created archive with following ...
1
vote
1answer
43 views

How to limit CPU usage while tar'ing a large file on a mounted NTFS partition?

I currently tar -cvf a 600gb folder, on the background, without compression. I noticed that my ubuntu lags so much during this process, that it becomes practically unusable. When I top I see that 60% ...
1
vote
0answers
20 views

tar / pack `a-r` “unreadable” files

If there are files unreadable even to the owner (chmod a-r), tar and other tools will throw errors when creating an archive. However, these files could be updated with chmod u+r before archiving, and ...
0
votes
1answer
82 views

“xz : (stdout) : Write error: File too large” while writing a tar archive

I wanted to compress a directory whit size of about 25 GB to .tar.xz format using following command: tar --xz --create --verbose --file myArchive.tar.xz /patch/to/my/dir but got these error lines: xz:...
0
votes
1answer
45 views

how to fix “tar: Cannot verify compressed archives” error?

I wanted to compress a directory into .tar.xz format and verify it after writing so I wrote a command like this: tar --xz --create --verbose --verify --file myArchive.tar.xz /patch/to/my/dir but it ...
0
votes
1answer
66 views

tar exclude not working within the bash

I can't get to work tar exclude with the bash script. #!/bin/bash CMD='tar --exclude=*.{db,log,token} -zcvf /home/pi/backup/2020.11.08-18.04.59.backup.tgz -P /home/pi/backup/test' echo $CMD sudo $CMD ...
1
vote
1answer
48 views

How to extract specific files using FIND + TAR command

I would like to know if it is possible to extract a specific file inside tar file using find command. Example: Normal situation: find filaname called "file1" and extract tar xvf tarfilename ...
0
votes
1answer
23 views

extraction archive

~/Downloads/t1$ tar tf test.t home/a/Downloads/t2/ home/a/Downloads/t2/z.txt home/a/Downloads/t2/y.txt ~/Downloads/t1$ tar xf test.t ~/Downloads/t1$ ls ~/Downloads/t2 ls: cannot access ’/home/a/...
-1
votes
1answer
92 views

linux + how to split ISO file to separate pieces [duplicate]

we are using the following ISO file for rhel upgrade 4.2G RHEL-7.6.iso since we have problem to copy this ISO file between WIN to Linux machine and that because sometime network problem cause ISO ...
-1
votes
1answer
60 views

How common is tar support for unpacking tars with long names (100+ characters)?

Today I encountered an issue where I couldn't tar a file with Java using Commons-Compress on Windows because one of the file names was longer than 100 characters. I was looking for solutions and found:...
0
votes
2answers
74 views

tar fails with "/rw/internal_apps/rainbow/filebrowser-xxx/proc/29826/exe: cannot read link: No such file or directory

I am trying to tar the system directories of a device running an embedded version of Linux but it fails. Here are the last few lines of the stderr. tar: /rw/internal_apps/rainbow/filebrowser-45905a3/...
0
votes
0answers
56 views

is it safety to compress LINUX ISO file and approach suggestion

We are working to upgrade our rhel servers ( rhel 7.1 ) to rhel 7.8 by rhel 7.8 ISO file Since we have 296 rhel servers version rhel 7.1 we plan to do the upgrade as the following We build Linux ...
0
votes
0answers
37 views

294GB tar file, what are foreseeable problems?

In rhel 7.8 I have a folder called /study that has a bunch of data. It was ~500GB in size. I did gzip -9r /study and it reduced that folder to 294GB as reported by du -sh /study I then did tar -cf ...
0
votes
2answers
41 views

How to tar.gz all files and directories from a given list of complete paths while maintaining directories and file permissions?

How do I create a tar.gz from A list of FULL PATH files (such as /root/test/abcd/123.txt ) that includes both directories AND files that preserves the ownership AND permissions of both files and ...
1
vote
3answers
46 views

tar archive restarts after a certain time

I have a folder with over 200k files in it. I want to archive only the ones beginning with a certain name(file names are super large). Example sudo find /path/to/_Logs -name "RATE*" -print0 |...
0
votes
1answer
725 views

Tar: File changed as we read it/ file removed before we read it Errors

I'm trying to create an automated backup script using the tar command: tar -czg /home/user/BackupArchiv/snapshots/snapshot_2020-10-12 -f /home/user/BackupArchiv/backup_2020-10-12/backupfull.tar.gz /...
0
votes
0answers
56 views

How to tell if piping a tar file as a stream to curl is streaming vs. saving to a cached file first?

I am trying to archive a folder using tar and then use curl to stream upload it without having to take up any space in my hard drive or memory. I have tar cf - "FOLDERNAME" | curl -v -T - \ ...
1
vote
1answer
93 views

Tar confusing error messages

I'm trying to create an automated backup file using the tar command. tar -czg /home/user/BackupArchiv/snapshots/snapshot_2020-10-09 -f /home/user/BackupArchiv/backup_2020-10-09/backupfull.tar.gz /home ...
1
vote
0answers
33 views

find out how many (posix) tar header blocks a file will require

Posix (pax) tar uses extended headers to allow long filenames etc.. Is there a way to find out how many 512 byte blocks will be used for the header for a particular file (before actually running the ...
0
votes
1answer
33 views

Tar command saves file in working directory instead of specified directory

I'm trying to make a automatic backup via the tar command: datum=$(date +%F) buweek=backup_$datum snap=snapshot_$datum mkdir /home/user/BackupArchiv/$buweek tar -czvg /home/user/BackupArchiv/...
1
vote
2answers
341 views

Checking if tar file exists | bash script

I am trying to test if the tar file I am about to create already exists. If it doesn't then I want to create the tar file (this part of the code works). However the if statement testing if that file ...
0
votes
1answer
54 views

Creating a tar file in a specified directory in a shell script

I am trying to create a tar file of an existing file or directory (file_dir_name) in a specified directory (dir_path). I need the tar file to be named new_name.tar in the new directory. However, when ...
10
votes
2answers
2k views

How portable is a gzip file over 4 GB in size?

To backup a snapshot of my work, I run a command like tar -czf work.tgz work to create a gzipped tar file, which I can then drop in cloud storage. However, I have just noticed that gzip has a 4 GB ...
3
votes
2answers
108 views

End of tape detection (ENOSPC) in tar multi-volume mode with pipes for encryption

Using tar in multi-volume mode relies on a ENOSPC error to detect the end of the first tape and prompt the user for the next tape. To simulate this behaviour consider the following example by writing ...
2
votes
1answer
37 views

Tarring up a a read-only partition

I'm new to Linux, and this is probably a silly question, but is there a way to set a partition to read-only and then tar up all the files on that partition and put them in a tar.gz on that partition? ...
0
votes
0answers
19 views

How to archive (tar) a folder and encrypt with gpg in one fell swoop without doing both separately?

I currently encrypt folders for upload to google by doing: First tar: tar cf foldername.tar /path/to/foldername and then gpg: gpg -c --cipher-algo AES256 -o foldername.tar.gpg foldername.tar I am ...

1
2 3 4 5
22