[wplug] TAR Shell Question
James O'Kane
jo2y at midnightlinux.com
Fri Mar 7 18:13:29 EST 2003
On Fri, 7 Mar 2003, Wise, Jeremey wrote:
> #!/bin/bash
> mount -t nfs 10.0.0.100:/home/test /mnt/cdrom
> mount -t nfs 10.0.0.100:/home/test1 /mnt/floppy
> tar cf - -C /mnt/floppy . |tar -xvf - -C /mnt/cdrom
>
> Though this works I do not understand why this does not.
> tar -cf -C - /mnt/floppy . |tar -xvf -C - /mnt/cdrom
The part from the man page said -- which is different from -
The f in the tar command expects the next argument to be the filename. In
the working one, you have - which means standard out. In the second one,
you are telling it to create a file called -C
-james
More information about the wplug
mailing list