Subject: Re: Tar and Find Problem
To: NetBSD Users <netbsd-users@NetBSD.ORG>
From: Bruce Anderson <brucea@wavefront.com>
List: netbsd-users
Date: 07/12/1998 22:05:00
I did read the man. Look at the reference to stdin/stdout.

" -f [hostname:]file
  --file [hostname:]
       file  Read or write the specified file (default is
       /dev/rst0). If a hostname is specified, tar will
       use rmt(8) to read or write the specified file on
       a remote machine. If the given file is `-', then
       tar uses stdin or stdout."

I was lementing the lack of support for stdio.

On Wed, Jul 8, 1998 4:28 PM, Aaron Nelson wrote:
> > % find /tmp -mtime 1 -type f |tar cvf my.tar -
> 
> eek . . . fundamental problem here . . . you are telling tar to create an

> archive called my.tar and store the file "-" into it.
> 
> Try it this way:
> 
> find /tmp -mtime 1 -type f -print | tar -T - -c -v -f my.tar
> 
> According to the man page (if I unstood it correctly), you can't mix
> argument styles ( these styles being no dash 'tar cvf', single dash 'tar
> -c -v -f', and double dash 'tar --create --verbose --file').
> 
> Therefore none of the following will work:  
> 
> 	tar -T - cvf my.tar
> 	tar cvf -T - my.tar
> 	tar cvf my.tar -T -
> 	tar --from-file - cvf
> 	etc . . . 
> 
> Read the EXAMPLES section of the man page for more details.
> 
> Yours,
> 
> Aaron Nelson
> 
 
----------------------------------------------------------------
This message was created and sent using the Cyberdog Mail System
----------------------------------------------------------------