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

learn more… | top users | synonyms

2
votes
3answers
95 views

Tar compress folder without specifying the filename

Is it possible to use tar to compress a folder without giving the filename of the archive to store in? Normally you use: tar -zcvf prog-1-jan-2005.tar.gz /home/jerry/prog I want to do something ...
3
votes
1answer
46 views

Is it possible to get file list, byte range from the head of a tar+bzip2 file?

Essentially, I'm hoping someone with an advanced knowledge of tar/bz2 can answer whether this is possible. The situation is that we have a periodic 24GB feed of data from a vendor, as a .tbz file. ...
-1
votes
3answers
84 views

Install tar.bz2 archive?

I cannot seem to find out how to install a tar.bz2 file. I've Googled it and I've came across two commands, these did not work. I've changed my directory to my downloads folder cd ~downloads after ...
2
votes
2answers
103 views

How can I flatten nested .tar.gz files?

I've got a bunch of .tar.gz files in different paths. I'd like to create a new .tar.gz file at some common ancestor of them and I don't want it to be composed of nested .tar.gz files. How can I easily ...
0
votes
1answer
202 views

How to install adobe flash tar?

I have a problem getting Flash working in Mint13 XFCE. Now I have downloaded the tar file, but I don't understand what I have to do to get this installed. I have this file: ...
1
vote
3answers
72 views

How do I reassemble randomly named tar file fragments?

I have a client whose sites were migrated to a new server back in 2012, and I am trying to piece together the old archive to retrieve one of the sites that was not moved. I found a set of files in a ...
4
votes
2answers
109 views

Extract given tarball and retar it exactly

My versioned project uses the contents of an upstream tarball. I would like to extract the contents in such a way as to be able to recreate the original tarball exactly. The reason is that I don't ...
1
vote
1answer
137 views

Getting “Bad file descriptor” error during tar

I'm trying to tar a dir with this command "tar -cpSWf myfile.tar workdir; gzip myfile.tar", but I get this error for some of the files in workdir dir. tar: my/sub/dir/file1.oa: Cannot seek to 1536: ...
0
votes
2answers
83 views

tar + how to extract from /var/tmp in order to place the directories under /

I work with solaris 9 machine In order to extract the list.tar file I need to change directory to / And from there I do: tar -xvf list.tar Example Cd / tar -xvf list.tar x ...
1
vote
2answers
74 views

portable command to unzip and untar on non GNU and old unix

On AIX 6.1 without GNU Tool installed I have a .tar.gz file. On Ubuntu I would use the very useful command : tar xzf myfile.tar.gz but in this case the z switch is not possible. I do remeber a ...
1
vote
3answers
774 views

Backup files with tar command and progress bar? [duplicate]

Can I see a progress bar or something not only ust the terminal screen output while backing up? Here is my shell script that I used backup with tar command: # !/bin/bash DATEJOUR=$(date ...
1
vote
2answers
71 views

Download the file from either of two machines using SCP?

I have a below bash shell script which I am running from machineA and that shell script will try to download a tar file from either of these two machines machineB and machineC and put it in ...
4
votes
1answer
40 views

Output file from Archive

Given that I have this archive my_archive.tar.gz which has this file in it: README. How can I output the content of README without having to extract the archive? OS: Debian 7
2
votes
1answer
66 views

Does * match hidden files in tar even with dotglob unset?

I was under the impression that the * glob does not match dot-prefixed files unless you manually enable such functionality (through dotglob, or your shell's equivalent). Yet if I have a directory a ...
5
votes
1answer
267 views

Transform a tar archive's paths without extracting it

GNU tar(1) has a neat option called --transform. From the man page: --transform, --xform EXPRESSION use sed replace EXPRESSION to transform file names This allows transformation of path ...
2
votes
2answers
347 views

How to create a gnu tarball that can be extracted by solaris tar

I am maintaining a legacy cygwin (with GNU tar v1.21) system and a legacy Solaris 9 system. The configuration of the Solaris 9 system is fixed and cannot be upgraded (i.e. I can't install gnu tar for ...
4
votes
1answer
88 views

Midnight Commander, using date in User menu

I would like to use MC (midnight commander) to compress the selected dir with date in its name, e.g: dirname_20131231.tar.gz The command in the User menu is : tar -czf dirname_`date ...
1
vote
1answer
95 views

touch and tar from a text file

Am trying to zip a certain number of files and am stuck at below point, ls -lrt /lag/cnn/*/*/*/adb.tar.gz | grep -nri ABC >> sample.txt In sample.txt i got filesNames on which i have to do ...
2
votes
1answer
104 views

tar.bz2 7zip selective extract prformance

We use tar.bz2 as our archive of server logs. We also write tools that selectively parse these archived logs. Many times I must regex-search one file’s lines in the archive to determine if other ...
2
votes
0answers
65 views

Make Tar Incremental Backups into One Backup?

Well, I know this question is quite strange. I have done a lot of incremental backups. It makes the total file size is too large, because there are a lot of duplicated files with similar contents, and ...
3
votes
1answer
89 views

Packaging with tar

I am trying to package the files: file1 folder2/hello folder2/world file3 into a tar file so they are encapsulated in a custom defined folder, so the tar -tvf archive.tar appears as: ...
0
votes
1answer
215 views

how to install yoono-desktop-1.8.43.tar.bz2 in linux

I recently yoono-desktop from http://www.yoono.com/desktop_features.html .How to install this file.
11
votes
3answers
1k views

What are the differences between bsdtar and GNU tar?

I've always used GNU tar. However, all GNU/Linux distributions that I've seen ship bsdtar in their repositories. I've even seen it installed by default in some, IIRC. I know for sure that Arch ...
4
votes
2answers
112 views

tar list files only

Fun fact: If you use Archive Manager and extract a .tar.gz so that you have "Keep directory structure" unticked, you will get a tarbomb. tar -ztf lists all the files and directories in a tar file. Is ...
0
votes
1answer
137 views

Unzipping a TAR file, causing an error

I am trying to unzip a .tar.gz file using tar xvzf, as hhaamu said in his answer to my other question about Installing GCC on SCO. When I type: bash-3.1$ tar xzf gcc-2.95.2pl1-dist.tar.gz tar: z: ...
2
votes
1answer
422 views

How to compare two tar archives (including file content, new/removed files, symlinks)?

I have two tar archives (compressed or not compressed), and I want to find all differences in the two archives. Both archives contain a complete file system (i.e. when unpacked, would generate ...
1
vote
1answer
82 views

How to see tar content including uid and gid?

I have a tar archive and want to see the content with the group-ids and user-ids. When using tar --list -v --file file.tar I see the user and group names, but I want to see the user-ids and ...
3
votes
2answers
263 views

how to include or add /dev with tar --one-file-system

I'm running tar on a complete remote filesystem using ssh -n <hostname> 'sudo tar -cpvzf - --one-file-system /' | cat > Bak.tar.gz This gave me a tarball. I tried importing this tarball ...
0
votes
1answer
382 views

How to check whether my cron job for backup using tar was succesfull [closed]

I have a cron job to tar backup websites and databases and upload the backup to a NAS. Instead of checking the tar files on the NAS. Is there any way to check if the tar backup process completed ...
3
votes
1answer
826 views

Extract single file from tar to other folder

I've searched for multiple forums for this questions and have seen different answers but so far, nothing have worked yet even from the ones I've seen here. I want to extract a single file from a tar ...
2
votes
1answer
115 views

tar and if-statement

I have a script that check if a file exist inside a tar file but something's wrong because it always go to the else part of the script. I am pretty sure that it shouldn't be that way. The date is in ...
5
votes
1answer
133 views

How do I hook into Tar with BASH?

Long Story Short I'm working with Tar archives that contain PNG images in base64 encoding. I would like to use BASH (or whatever else works) to hook into the extraction function of Tar to decode PNG ...
0
votes
1answer
201 views

Extract a single file from a tar file and put it to another directory [duplicate]

I need to extract a single file from a tar file to another directory. So far I have this: This one extracts a single file to same directory: tar -xvf filename.tar ./file.txt I tried this but it's ...
4
votes
1answer
126 views

What is the difference between a tar of a complete filesystem and an image?

I can create an image of a filesystem, or I can create a tar-file containing all of it. Is an image therefore something like a tar-archive? Or do these two types differ in more ways?
5
votes
1answer
99 views

How to uninstall applications that were installed using tar command

Can anyone explain me how to uninstall the applications that are installed by extracting using tar command (tar files) . I am really struggling to find an uninstall file . Surprisingly, I dont't find ...
2
votes
1answer
240 views

Tar ignore or fix checksum

I have a archive backup.tar that was created with a nonstandard program a long time ago. I no longer have access to the original program. The archive is Not compressed (gzip). When trying to extract ...
3
votes
2answers
1k views

Search for a file inside a tar.gz file without extracting it and copy the result to another folder

I need to search for a file inside a tar.gz file without extracting it. After that, I need to copy the file that was searched (if ever there is) to another folder. So far I have this, but the copy ...
2
votes
2answers
2k views

How to make tar save the archive on a remote machine using sftp or ftp?

I would like to backup some of my very important data on a remote machine. Currently I'm just saving it to my local machine by using this command: tar -cvjf ~/backups/Backup.tar.bz2 ~/importantfiles/* ...
1
vote
2answers
210 views

Extract TAR to SD-Card and verify contents afterwards

We currently extract a TAR archive to a SD-Card like this tar xf ${ROOT}/rootfs.tar -C /cynox/${DRIVE}/${TARGET} As a side note: The rootfs.tar contains files for an embedded Linux system. Some of ...
1
vote
1answer
56 views

Portable software for the Posix world

Is there any "portable" software for Linux (i.e., Ones that can just be un-tar'd and used, instead of in rpm, or similar format. to be used in conjunction with a package manager)? Also, are there any ...
9
votes
2answers
29k views

Can I zip an entire folder using gzip?

I'm trying to zip a folder in unix. Can that be done using the gzip command?
2
votes
1answer
123 views

recover partially overwritten tape from tar -c

I have a situation. I was supposed to run tar -x to recover a tar file from a tape but I pressed "c" and forgot to put the tape on readonly. The file was on fsf position 23, but the tape had 27 files. ...
5
votes
1answer
66 views

tar '-u' operation

When adding an updated version of a file to a tar file using '-u', and looking at the tar file with '-t', I notice that a newer version gets added to the end (the tar file also increases in size); ...
2
votes
1answer
104 views

What characters TAR doesn't like?

I keep a list of photos burned to dvds for incremental backups but I got into a strange situation where a file was already burned into a dvd but tar keeps saying it's not. Here the steps to reproduce: ...
1
vote
1answer
148 views

Error handling with tar and keep-old-files option

I am unpacking tar files with the option --keep-old-files so that I don't clobber files that are already there. The annoying thing is that this causes tar to produce an error code #2 (fatal error) ...
0
votes
2answers
114 views

Installer packages: .bin, -rpm.bin, tar, tar.z

Is it correct that most of Unix&Linux software supports x-copy deployment? If I download the installation package and uncompress the files into a particular directory - would that be enough to ...
1
vote
2answers
2k views

tar: short read

I get an error when I uncompress my tar. I do this: tar xvf VM_DECOMPTES.tar and after some time I get the following error: tar: short read What is going wrong here? tar: unrecognized ...
0
votes
2answers
284 views

Is it safe to assume the tar.gz file is healthy?

I have a rather large tar.gz file (17GB) which is a tar.gz version of a directory. The problem here is I got the following message after the tar operation. tar: Error exit delayed from previous ...
1
vote
3answers
114 views

Taking Backup of files of particular limit in unix

Here is the scenario, I have 1000 files in a folder each ~3 MB. I want to zip all files into 50MB each zip and remove the original files. NOTE: 50MB may contain 20 files or 10 files but that zip ...
1
vote
4answers
367 views

tar a specific number of files listed in a text file

I have a text file which contains a list of files. I use. tar --null --no-recursion -uf abc.tar --directory= /tmp/temp --files-from abc.txt This command simply creates a tar with all the files ...