Tag Info

New answers tagged

0

try: for *.tar.gz for file in *.tar.gz; do tar -zxf $file; done for *.tar.bz2 for file in *.tar.bz2; do tar -jxf $file; done for *.tar.xz for file in *.tar.xz; do tar -Jxf $file; done


2

First of all you should realise that a .tar file is normally not compressed (it would more likely have an extension .tar.gz or .tar.xz if it is). And your tar -xvf xyz.tar extracts the files and lists the names, sed works on the list of filenames, not even the file contents. If you have exact same length substitutions as the originals, then you could ...


5

While others have pointed out that it treated it as -c -f v, I feel I should note that this is only done because the dash was used, and this behavior does not apply to all versions of tar. In legacy mode (no dash), tar treats the first argument specially, and a "f" or "b" within it will consume the next full words after the options (so tar cfb file.tar 20 or ...


8

As @jcbermu said, for most programs and in most cases, the order of command line flags is not important. However, some flags expect a value. Specifically, tar's -f flag is: -f, --file ARCHIVE use archive file or device ARCHIVE So, tar expects -f to have a value and that value will be the name of the tarfile it creates. For example, to add all ...


9

The order doesn't matter as long as the option doesn't need a value. In your case -f needs to specify a filename. In the first case (tar -cfv) the command believes that the output filenames is v because is after -f.


0

why not cd /export/home/tceng/Desktop/temp/TestExtractUtility/ tar xvzf /export/home/tceng/Desktop/temp/3.tar.Z where you cd to /export/home/tceng/Desktop/temp/TestExtractUtility/ untar compressed file with tar xvzf please note that untar will make recursive directory, for instance a tar of /foo/src/foo.c /foo/lib/bar.a /bar/whateever/etc/... ...


1

libbpg depends on version 1.6 of the PNG library, which you cannot install with apt-get on Linux Mint 17. This library is incompatible with libpng12 and needs to be installed from source (I used version 1.6.16) The additional complication is that if you install PNG 1.6 the make of libbpg still uses libpng12-dev even if you configure PNG 1.6 with configure ...


3

It could be that stardict-2.0.0-pre2.tar.gz and stardict-2.0.0.tar.gz are just not functional. I attempted to install both on CentOS 5.6 without success. The INSTALL and README are indeed empty on the pre2.tar.gz version. Unless you specifically need this version I recommend installing stardict-2.4.8.tar.bz2 instead. wget ...


0

The tar exit codes are documented in the "info" manual - use info tar to read all about tar. (You can read about "info" with info info). It seems there are 3 (major) exit codes. From the info tar documentation: Possible exit codes of GNU 'tar' are summarized in the following table: 0 'Successful termination'. 1 'Some files differ'. If tar ...


0

You can use cp to a tape. But a device like /dev/st0 is configured for rewind-on-close. So a second cp will overwrite the first. Were you to use /dev/nst0 (?), which is the no-rewind-on-close device, you would get an EOF mark on the tape at the end of each file. When you eject the tape a second EOF would be written indicating End Of Tape. It's possible to ...


0

A tape contains files but not a filesystem*. Using the word 'file' for both is a bit misleading. A file on a tape is nothing more than a stream of bytes closed with an EOF mark. That is all. As wurtel wrote, a "file" on a tape has no name, no attributes. In other words, there is no catalogue of these files. Catalogue = filesystem. cp deals with files in ...


1

try from user@localhost > ssh -l remoteuser remotehost "tar cf - dir_to_transfert" > remote.tar where > is the prompt ssh -l remoteuser remotehost connect you to remote host "tar cf - dir_to_transfert" perform remote tarin to standard output > remote.tar redirect ssh's output to localfile name remote.tar this will work if you are allowed ...


1

You can use pv. More details here.


5

xz -d < file.tar.xz | tar xvf - That's the same as with any compressed archive. You should never have to create an uncompressed copy of the original file. Some tar implementations like recent versions of GNU tar have builtin options to call xz by themselves. With GNU tar or bsdtar: tar Jxvf file.tar.xz Though, if you've got a version that has -J, ...


3

Unpacking is probably not the right terminology. You can decompress with xz and untar with tar. The manual page for GNU tar (man tar, GNU tar is default on Debian) specifies that you can use: -I, --use-compress-program PROG filter through PROG (must accept -d) and xz supports the -d option, so you can use: tar --use-compress-program xz xvf ...


1

This should be the way to go tar Jxvf file.txz


0

GNU tar can read a list of files to add to the archive from a file or stdin with the -T option. Assuming the files in question can be sorted lexicographically: find <directory> -type f | sort | tar -T - -b 1024 -cvf /dev/tape



Top 50 recent answers are included