Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <01C10048.1B19B740.jorgens@coho.net> From: Steve Jorgensen Reply-To: "jorgens AT coho DOT net" To: "cygwin AT cygwin. Com (E-mail)" Subject: FW: Not working: find . -lname ".*" -print Date: Fri, 29 Jun 2001 03:03:33 -0700 X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Just so no one thinks I didn't figure out this was a waste of time, I just found the information about how CVS doesn't do symlinks. Therefore, there's no reason to catalog and rebuild symlinks after check-out for moving files from Cygwin to Linux after receiving them from CVS. Oh well, I learned more about the find command, anyway. -----Original Message----- From: Steve Jorgensen [SMTP:jorgens AT coho DOT net] Sent: Friday, June 29, 2001 1:43 AM To: cygwin AT cygwin. Com (E-mail) Subject: RE: Not working: find . -lname ".*" -print I thought that was supposed to be a regular expression, so .* should match anything. Based on your reply, I tried a plain *, and sure enough, I got everything, so that's my answer. Thanks. On Linux, it happens that the symbolic links in the directory I was in did point to files with paths starting with periods, so that's why it worked. I can't remember right now, but I think it may have even shown links into the same directory as ./ so all would have matched. The reason for doing this, by the way, is that while I was trying out a script to copy permissions for that CVS issue, I got errors because you can't chmod a symlink. Doh! I have to copy symlinks as well. So, I figure if I write a script that can build a script to recreate the symlinks, and delete the current symlinks, build a script to apply the permissions, copy the files to Linux, run the permissions script, and run the symlink script, I'll be in business. If it works, I guess I'll have something to contribute to the FAQ. Thanks, Don -----Original Message----- From: Don Sharp [SMTP:dwsharp AT iee DOT org] Sent: Friday, June 29, 2001 1:21 AM To: jorgens AT coho DOT net Subject: Re: Not working: find . -lname ".*" -print Do you have logical links whose name begins with a "." ? Cheers Don Sharp Steve Jorgensen wrote: > > 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/ -- 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/