This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Not working: find . -lname ".*" -print


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]