| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can instruct tar to send the contents of each extracted
file to the standard input of an external program:
Extract files and pipe their contents to the standard input of
command. When this option is used, instead of creating the
files specified, tar invokes command and pipes the
contents of the files to its standard output. Command may
contain command line arguments. The program is executed via
sh -c. Notice, that command is executed once for each regular file
extracted. Non-regular files (directories, etc.) are ignored when this
option is used.
The command can obtain the information about the file it processes from the following environment variables:
TAR_FILETYPEType of the file. It is a single letter with the following meaning:
f | Regular file |
d | Directory |
l | Symbolic link |
h | Hard link |
b | Block device |
c | Character device |
Currently only regular files are supported.
TAR_MODEFile mode, an octal number.
TAR_FILENAMEThe name of the file.
TAR_REALNAMEName of the file as stored in the archive.
TAR_UNAMEName of the file owner.
TAR_GNAMEName of the file owner group.
TAR_ATIMETime of last access. It is a decimal number, representing seconds since the epoch. If the archive provides times with nanosecond precision, the nanoseconds are appended to the timestamp after a decimal point.
TAR_MTIMETime of last modification.
TAR_CTIMETime of last status change.
TAR_SIZESize of the file.
TAR_UIDUID of the file owner.
TAR_GIDGID of the file owner.
In addition to these variables, TAR_VERSION contains the
GNU tar version number.
If command exits with a non-0 status, tar will print
an error message similar to the following:
tar: 2345: Child returned status 1 |
Here, ‘2345’ is the PID of the finished process.
If this behavior is not wanted, use ‘--ignore-command-error’:
Ignore exit codes of subprocesses. Notice that if the program exits on signal or otherwise terminates abnormally, the error message will be printed even if this option is used.
Cancel the effect of any previous ‘--ignore-command-error’
option. This option is useful if you have set
‘--ignore-command-error’ in TAR_OPTIONS
(see TAR_OPTIONS) and wish to temporarily cancel it.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Sergey Poznyakoff on March, 29 2009 using texi2html 1.78.