This is the mail archive of the
mailing list for the Cygwin project.
Re: Links: +S attribute removed: recover?
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 28 Feb 2012 10:35:35 +0100
- Subject: Re: Links: +S attribute removed: recover?
- References: <4F4C92DA.firstname.lastname@example.org>
- Reply-to: cygwin at cygwin dot com
On Feb 28 08:39, Fergus wrote:
> Links of the style
> $ ls -al /bin/awk
> lrwxrwxrwx 1 fergus hdd 8 Feb 28 07:27 /bin/awk -> gawk.exe*
> are located on the drive as readonly +R .lnk files or +S system files.
> Suppose through a keyboard slip outside Cygwin all the file
> attribites on a Cygwin filesystem are lost. Then +R attributes can
> be recovered through the DOS command
> attrib +R *.lnk /s
> but can anybody tell me whether (and if so, how) it is possible to
> recover links created as +S files?
These symlinks are simple text files which start with the magic string
"!<symlink>" or, in case of AF_LOCAL sockets, with "!<socket >" or,
in case you're using Interix as well, with "IntxLNK". I'm afraid you
have to scan all text files and see if they start with one of the
aforementioned strings and if so, set the S bit using the Win32 attrib
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple