Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Recursion and shell functions



DervishD <raul@xxxxxxxxxxxx> writes:

>     First of all, please excuse this a-bit-off-topic question, but I
> need to know if a feature available in zsh is portable.

You could re-invent the wheel, but why?

(cd <your source dir> ; tar -cpvf - .) | ( cd <your dest dir> ; tar -xpf -)

Or if you want to preserve things, I imagine a similar incantation with
rsync will work just as well.

The above works amazingly well with ssh too:

cd <your source> ; tar -cpvf - . | ssh -l <name> <host> "cd dir ; tar -xpf -"

Rsync is good, but in some comparisons tar over rsh worked better for
large directories with lots of files in the 'copy everything first time'
case.  In the 'just the delta's needed' case, rsync wins.

Jason



Messages sorted by: Reverse Date, Date, Thread, Author