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
26 views

What archival method (tar, zip, 7z, etc) allows me to retain folder modification dates on macOS?

I currently have a directory in a hard drive, say TopFolder which contains 3 subfolders, Folder1, Folder2, and Folder3. When I am in the top level directory of the hard drive, and do: tar cf TopFolder....
0
votes
1answer
26 views

Find tar archives not already existing as folders

I have a couple of tar archives, among them, some have the same filename as folders: folderA folderA.tar folderB.tar ... I want to be able to list/find all the tar files (ideally on the same/current ...
0
votes
1answer
13 views

Make Tar update existing archives only if present

So i have this one-liner i used: find . -maxdepth 1 -mindepth 1 -type d -exec tar cvf {}.tar {} --remove-files \; Where it tar each top directory into their own tar archive, while deleting files ...
-1
votes
0answers
9 views

Investigating User activity in EC2 instance

HI long story short I've got this task from my supervisor asking me to investigate a File that was created by an ex-employee in our administration/JumpBox EC2 box (debian) in his /tmp directory. For ...
0
votes
0answers
19 views

Getting “tar: Exiting with failure status due to previous errors” while trying to compress a directory

I'm trying to compress a directory but getting this error tar: Exiting with failure status due to previous errors I'm using centos 7 on aws instance and here is the commands I've tried tar cvzf hmd....
1
vote
1answer
54 views

I have extracted a tar file in the wrong directory

I have extracted a tar file in the wrong directory, and this tar file extracted 200 files. I cannot remove everything from the directory because there are 10 files that are sitting in the directory, ...
0
votes
1answer
49 views

How to use multi-threading for creating and extracting tar.xz

I use tar -cJvf resultfile.tar.xz files_to_compress to create tar.xz and tar -xzvf resultfile.tar.xz to extract the archive in current directory. How to use multi threading in both cases? I don't ...
2
votes
1answer
78 views

How do you determine the remaning capacity of a magnetic tape with mt or tar? How much space is in a block?

I am currently trying to back up data onto an LTO-4 tape using mt-st and gnu tar 1.32, but I want to make sure I stop trying to copy things before the tape runs out! LTO-4 nominally has a capacity of ...
0
votes
0answers
37 views

Linux bash script (creating tar.gz multiple files)

I need to create a script which create .tar.gz files called same_numbers_$i. Eeach tar.gz need to contain all the files of the directory started with the same number using loop for to 1 >40. I ...
0
votes
1answer
32 views

Delete directories after compressing with tar

I´m trying to compress a whole directory tree, leaving just one .tar.bz2 file instead of each directory that I found with find. The purpose is to create a cronjob for doing this in weekly basis. The ...
0
votes
1answer
49 views

Installing DHCPD on Arch Linux

I've installed Arch Linux today and am a bit of a noob at using it, so when I had done the installation my system would connect too my network fine, but after rebooting it stopped and gave me an error ...
0
votes
1answer
33 views

How to extract a compressed tar using cpio to a particular directory location

I created the compressed tar file using the below command. find /app/jboss -not -name "*.err" -not -name "*.log" | cpio -o | gzip >/app/patchbkp/test/REDHAT_jboss-eap-7.2_18-Aug-...
1
vote
2answers
44 views

Create tar file that stores filenames, but not file contents

Basically I want to create a tar image of a folder structure, but not store the actual file contents. So when I untar the file I want to get the original folders, filenames, timestamps, etc.., but all ...
0
votes
0answers
40 views

Why is tar creating file size 10240 and how to export exact part of file name to variable?

I'm using wget to recursively fetch directories filed with files. There are many folders and files in it. I'm downloading all directories recursively too. Sometime-somehow wget "stuck" and ...
0
votes
1answer
25 views

Tar multiple files in a custom way?

I faced a problem of building a tarball for my application manually to prepare a distribution. My project structure looks as project_root | |__resources | |____config.conf | ...
3
votes
1answer
379 views

File ownership preservation with .tgz

Back with another probably very very basic UNIX question. I understand the premise of Tape Archive Zips (.tgz) is that they preserve uid, gid, permissions... However, it seems that this isn't portable....
2
votes
2answers
57 views

Why tar uses absolute path even though I have changed to dir via -C?

Having this: $ls $des/bin a.c analysis.hpp classify.hpp main.cpp split.hpp a.cpp a.out grade.cpp main.out student.cpp analysis.cpp classify.cpp grade.hpp ...
2
votes
2answers
93 views

How to tar only specified files via wildcard?

I would like to tar only specified files. I have tried: $ ls $des/bin a.c analysis.hpp classify.hpp main.cpp split.hpp a.cpp a.out grade.cpp main.out student.cpp ...
-1
votes
2answers
48 views

How do i split my tar.gz into multiple files in a single exec command? [duplicate]

I don't know anything about Unix/Linux. I am primarily a web programmer. I am running the following command in my code: exec("tar -caf '/backups/_structure.tar.gz' --ignore-failed-read -C /source ...
-2
votes
1answer
71 views

Need solution to archive a folder excluding all .log and .err files using wildcards

I wish to archive all files and folders under /app/jboss while excluding all .log and .err files. The directory structure under /app/jboss is too vast and complex. Thus a few sample files below should ...
2
votes
1answer
59 views

Tar incremental backups - skip restoring deleted files

To restore an incremental backup we need to first restore the full backup then the incrementals in the same order then deleted files are removed. It is useless to restore files then delete them and ...
0
votes
1answer
65 views

Does GNU tar incremental backup save an entire file again, even if only atime or mtime is different?

mkdir test echo "hi" > test/file1 tar -c -f archive.0.tar -g test.snar test touch -a test/file1 # changes atime and ctime, doesn't change mtime tar -c -f archive.1.tar -g test.snar test ...
0
votes
1answer
32 views

Can GNU tar incremental backup use checksums?

According to GNU tar manual: Incremental dumps depend crucially on time stamps, so the results are unreliable if you modify a file's time stamps during dumping (e.g., with the `--atime-preserve=...
0
votes
1answer
39 views

Why won't tar/gzip compress two similar large directories?

A long time ago, before I tried incremental and differential backups, I tried to tar/gzip several similar large (1 GB) directories, but they did not compress any better than tarring and gzipping each ...
3
votes
1answer
80 views

broken pipe when tar extracted from stdin buffer

I am restoring files from a tar archive on an LTO-7 tape to a locally mounted network share. If I directly restore to the share it runs very slowly (90 MB/s). When I use an additional buffer I get the ...
7
votes
1answer
140 views

Modify file names in tar file without extracting files to temporary location

I have a tar file that contains some files in a folder named old_name. Now I'd like to create a new tar file where that folder has been renamed to new_name without extracting to file to disk as that ...
-4
votes
1answer
47 views

How to unpack *.tar.gz

I have used the command tar zxvf filename.tar.gz ...to try to unpack the file. However, upon entering the command the screen just fills with x hadoop-3.1.1/share/doc/hadoop/hadoop-client-runtime/...
-4
votes
1answer
91 views

tar refuses to write archive contents to terminal

I'm trying to install linux on my computer and it was going smoothly until I put in this command curl https://chrx.org/ | sudo tar xzfc - /usr/local && chrx tar: You may not specify more than ...
0
votes
1answer
44 views

difference between two tar commands

i want to tar the contents inside /some/directory/ and this directory has lots of files and other sub directories in it. what is the actual difference between the below tar commands, i noticed the ...
0
votes
1answer
23 views

tar: don't create “.” directory

I'm creating a .tar.xz archive like this: XZ_DEFAULTS="T$(nproc)" tar cvfJ "$archive" -C "$dir" . It's creating this useless . directory when I try to open the archive: ...
0
votes
0answers
17 views

Get data from corrupt lz4 tar archive

I have a tar, that somehow got corrupt. I very much need some certs and config files I backed up using said file. Problem is, there's a corrupt folder in the archive and tar bails after hitting it. Is ...
0
votes
0answers
61 views

How to tar all files and directories except one?

I want to zip a directories and its files. For that I want to use tar. This directory contains a sub-directory called ignore which should not be included in the zipped file. How can I use tar to zip ...
1
vote
2answers
26 views

search and tar files respecting folder structure?

I'd like to search for all csv files in a few "date" subfolders, and then tar them preserving that structure, since the date is only at the level of folder, not file. So, for example I have ...
2
votes
1answer
74 views

Write tar archive to tape and then extract individual files

I would like to write a tar archive to tape, and at the same time store the block offsets for each file in a lookup table. Then when I want to restore an individual file from the archive, I would seek ...
1
vote
1answer
27 views

Can I write the same tar archive to two tapes at once?

Is it possible to simultaneously write a tar archive to two tape drives using a single command, by directing the same output to both drives? I want to save time by performing the operation in ...
0
votes
1answer
41 views

What happens when I create a file in the directory that is being archived with tar?

I have a large directory (80GB) that I want to compress into the archive. What happens, when a new file is created in that directory, while it is being tared? Would new files be included in the ...
0
votes
1answer
42 views

Use disk like tape

We are building a data archiving system where we want to have the option to store redundant copies of data on different storage types: tape/disk/cloud, and also with the option of using different ...
1
vote
1answer
60 views

Rsyncing directory to a backup gzip file

Objective: The efficient backup and transfer of ~/dircontaininginnumeraltinyfiles/ to /mnt/server/backups/dir.tgz. My first thought was of course rsync and gzip. But I'm open to other routes as well. ...
4
votes
2answers
121 views

How do I write sequentially several tar's to a tape?

I am trying to write several directories to a tape. Each directory with one tar command. So I have the following sample file/directory structure: user@host1:~/temp/original % find . . ./foo1 ./foo1/...
0
votes
0answers
39 views

How can I know how many files are stored in a tape?

I have installed an SCSI DDS4 tape drive and I have read: https://www.freebsd.org/doc/el_GR.ISO8859-7/books/handbook/backups-tapebackups.html and https://docs.freebsd.org/doc/2.1.5-RELEASE/usr/...
0
votes
1answer
36 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
56 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
38 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
34 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
40 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 ...
0
votes
2answers
63 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
39 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
52 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
46 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
108 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 ...

1
2 3 4 5
21