[Novalug] Having problems copying data using cp over nfs

Mike Shade mshade at mshade.org
Tue Jun 19 17:02:58 EDT 2007


The - tells tar to send its output to standard output so the pipe will  
work.  It's used in place of an archive file name here.

Likewise, it tells tar to read from standard input on the receiving  
end of the pipe.

Quoting Jay Hart <jhart at kevla.org>:

> Don,
>
> I don't understand the below commands. Here is what I think it does:
>
> 1. change to WRK dir and tar everything in it
> 2. pipe the output from #1 to the dir shown in the 2nd parens and untar it
>
> What does the "-" do?
>
>
>> Try the command combo:
>>  $ WRK="/home/jhart/Maildir"
>>  $ (cd $WRK && tar cf - . ) | (cd /mntpoint/email/$WRK && tar xvfp - )
>>
>> This uses 'tar' {the tar archiving utility} to get those "invisible"
>> files and directories, plus it may even be a little faster then a simple
>> cp.
>>
>> --
>> --
>>  Don E. Groves, Jr.
>>
>> $ /usr/games/fortune : You will inherit millions of dollars.
>>
>
>
> _______________________________________________
> Novalug mailing list
> Novalug at calypso.tux.org
> http://calypso.tux.org/cgi-bin/mailman/listinfo/novalug
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.





More information about the Novalug mailing list