Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Recursion and shell functions
- X-seq: zsh-workers 17803
- From: Jason Price <jprice@xxxxxxxxxxxxxxxxxxxx>
- To: DervishD <raul@xxxxxxxxxxxx>
- Subject: Re: Recursion and shell functions
- Date: 10 Oct 2002 16:02:15 -0400
- Cc: Zsh <zsh-workers@xxxxxxxxxx>
- In-reply-to: <20021010194154.GA10963@DervishD>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20021010194154.GA10963@DervishD>
- Sender: jprice@xxxxxxxxxxxxxxxxxx
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