Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Compare directories the most efficient way
- X-seq: zsh-users 9557
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Compare directories the most efficient way
- Date: Tue, 25 Oct 2005 10:45:27 +0200
- In-reply-to: <fb6be96e0510242027r7b07429dh6ca31f55846079e7@xxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20051025.050856.41172296.Meino.Cramer@xxxxxx> <fb6be96e0510242027r7b07429dh6ca31f55846079e7@xxxxxxxxxxxxxx>
On 2005-10-25 12:27:28 +0900, Jean Chalard wrote:
> > There are two identical directory trees with binary stuff in it but
> > with a different prefix for example:
> > /home/user/onetree/.
> > and
> > /home/user/theothertree/.
>
> I think I may have missed something here, because I can't see why
> something like
>
> for i in onetree/**/*; do cmp -- "$i" "${i/onetree/theothertree}"; done
>
> ...wouldn't work.
Several problems:
* If there's a file in theothertree that doesn't exist in onetree,
you won't see the corresponding error.
* I think you should use something like onetree/**/*(D^/) to include
files starting with a dot, but not directories.
* If there are special files (symlinks...), this is even more
complicated.
"diff -r" (possibly with -q) from the diffutils is probably a better
choice.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
Messages sorted by:
Reverse Date,
Date,
Thread,
Author