delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
X-OB-Received: | from unknown (205.158.62.55) by wfilter.us4.outblaze.com; 16 May 2008 22:53:04 -0000 |
MIME-Version: | 1.0 |
From: | vapid AT mindless DOT com |
To: | cygwin AT cygwin DOT com |
Date: | Fri, 16 May 2008 17:53:04 -0500 |
Subject: | Re: links broken during a backup (not restore), need more info on how they work to fix & file bug with vendor |
Message-Id: | <20080516225304.E3502104F0@ws1-3.us4.outblaze.com> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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 |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id m4GMrciK019455 |
Thank you for the quick response Igor. > You need to use "attrib +R" on .lnk files and "attrib +S" on the > plain-text links. I swear I tried attrib +R on both types of links earlier, but I must have only tried the plain-text ones. It does fix the .lnk's as you said. I'm using these two [slow] commands to fix up my system. find / \( -name cygdrive -o -name proc -o -name dev \) -prune -o -name \*.lnk -print -exec bash -c 'attrib +R "`cygpath -d \"{}\"`"' \; find / \( -name cygdrive -o -name proc -o -name dev \) -prune -o -type f -exec bash -c 'grep "^\\!<symlink>" "{}" && attrib +S "`cygpath -d \"{}\"`" ' \; They scan through the cygwin root and any disks you have explicitly mounted. I don't think it would actually hurt stuff on the windows side of the disk, but I am trying to stay out of those directories. I'm fairly certain the second one is safe everywhere, but the first one may +R some non-cygwin links, if you have mounted windows directories. This doesn't seem to affect windows; the shortcut still work in explorer. The windows created shortcuts don't seem to work in bash with or without the +R, which is fine with me. Maybe someone can come up with a fancier find. I had to spawn a bash to use the && and delay the evaluation of the `cygpath {}`. There's a lot of quoting to deal with spaces in filenames. -- See Exclusive Video: 10th Annual Young Hollywood Awards http://www.hollywoodlife.net/younghollywoodawards2008/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |