Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Compare directories the most efficient way
- X-seq: zsh-users 9555
- From: Meino Christian Cramer <Meino.Cramer@xxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Compare directories the most efficient way
- Date: Tue, 25 Oct 2005 05:08:56 +0200 (CEST)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi,
(using Linux)
I have a problem and dont know, whether zsh includes some "extras" to
solve it.
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/.
Unfortunately the files in there have "invalid" filenames with spaces
and other ASCII- and not-so-ASCII-traps (german Umlauts for example).
It is not possible to rename the files with detox, since then other
things will no longer work.
I want to binary-compare all files of one tree with those
corresponding ones of the other tree. For this purpose I choose the
"cmp" command (but if there are others more zshy ones...I have no
problem to use those.... :O).
The problem is to write a function/routine/script or whatever to do
that job. Everything tried result in errors like:
This : file not found
is : file not found
one : file not found
file : file not found
with : file not found
spaces : file not found
.bz2 : file not found
I tried "find <path> -ls | cut -b 69- " as a source for escaped filenames
in a for/do/done-loop but it failed the same way as mentioned above.
Is there any way out? :)
Thank you very much for any help in advance.
Keep zshing!
Meino
Messages sorted by:
Reverse Date,
Date,
Thread,
Author