This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Not working: find . -lname ".*" -print
- To: "cygwin at cygwin dot Com (E-mail)" <cygwin at cygwin dot com>
- Subject: Not working: find . -lname ".*" -print
- From: Steve Jorgensen <jorgens at coho dot net>
- Date: Fri, 29 Jun 2001 01:20:01 -0700
- Reply-To: "jorgens at coho dot net" <jorgens at coho dot net>
I'm trying to write a script that, for each symlink in a tree, outputs a
line to another script file to recreate the symlink, then removes the
symlink. I started playing with find on my Linux system, and was able to
get a list of symlinks in a tree using
find . -lname ".*" -print
I see that using -printf, instead, I can get it to generate anything I
could need. Anyway, I start up my Cygwin bash prompt, cd /bin where I know
there are symlinks, and type the same line, but I get no output. If I
enter a known link destination instead of .*, then it works
$ find /bin -lname "unzip.exe" -print
/bin/zipinfo.exe
So it looks like find sees the symlinks just, but it's not handling the .*
regular expression properly. Is this a problem with me or with find? I
know it's not the quotes because it gives an error on either Linux or
Cygwin without them. I assume that means the shell is expanding it before
find gets it in that case.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/