Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 11 Feb 2003 15:07:59 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Changing symlinks from "magic" format to windows shortcuts. Message-ID: <20030211140759.GG28314@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20030211130506 DOT atomice AT plus DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030211130506.atomice@plus.net> User-Agent: Mutt/1.4i On Tue, Feb 11, 2003 at 01:05:06PM -0000, Christopher January wrote: > How can I automatically convert all symlinks on my Cygwin filesystem from > the "!" format to windows shortcuts? Samba doesn't seem to > maintain the correct permissions for the Cygwin DLL to detect the > "!" files as symlinks, so they are treated as regular files > (hence the errors with gcc, etc. I was seeing). Thanks Chris and others > for pointing me in the right direction to diagnose this. I now need a way > of converting all those symlink files to windows shortcuts so I can use > Cygwin at college. > Chris Write a script which reads the content of the symlink, then removes the old one and eventually recreates it. The resulting symlink will have the appropriate format according to the CYGWIN env. var. Sth like this for i in `find / -type l` do TARGET=`ls -l $i | awk '{print $NF;}'` rm $i ln -s $TARGET $i done Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/