tar and stdio (was: Anyone know of a random data generator?)

Jerry Feldman gaf at blu.org
Fri Jul 30 08:01:01 EDT 2004


On Thu, 29 Jul 2004 21:21:03 -0400 (EDT)
bscott at ntisys.com wrote:

> On Fri, 30 Jul 2004, at 5:21am, invalid at pizzashack.org wrote:
> > Only as the argument to the 'f' flag...
> > 
> >   $ cat intro |tar cf plah.tar -
> >   tar: -: Cannot stat: No such file or directory
> >   tar: Error exit delayed from previous errors
> > 
> > The intended result in this case can be acheived by just leaving off
> > the '-' at the end.  Then tar will read its input from stdin.
> 
>   Er, not with my 'tar', and I don't think in the general case,
>   either.
> 
> $ cat .bashrc | tar cf foo.tar  
> tar: Cowardly refusing to create an empty archive
> Try `tar --help' for more information.
> $ 
Tar does not take archive contents by stdio. But it does take filenames
by stdio:
cat list | tar cf foo.tar -T -

Where 'list' contains the names of the files you want to place into the
archive. 
-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20040730/1c92b9e0/attachment.bin


More information about the gnhlug-discuss mailing list