delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/11/09:08:13

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <corinna-cygwin AT cygwin DOT com>
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
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 "!<symlink>" format to windows shortcuts? Samba doesn't seem to
> maintain the correct permissions for the Cygwin DLL to detect the
> "!<symlink>" 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019