Symlink Size [was Rebase/Perl packaging problem?]
Wed Nov 28 09:08:00 GMT 2012
On Nov 27 18:27, Buchbinder, Barry (NIH/NIAID) [E] wrote:
> Barry Buchbinder sent the following at Tuesday, November 27, 2012 6:02 PM
> >For the record, I was worried that if I simply deleted it cygcheck -c
> >perl would report perl as incomplete. So I changed the link so that it
> >pointed to </usr/bin/cygperl5_14.dll>. cygcheck reports complete and the
> >rebaseall error message goes away.
> This is just for my education.
> While looking at this, I noticed (where "noticed" = "was confused and
> thought that something was wrong") that the ls showed the symlink to be 24
> bytes while Widows Explorer (properties) and cmd /c DIR showed it to be
> 35 bytes. When I copied the symlink nothing changed. When I removed the
> system attribute of the copy (making it no longer a symlink), ls started
> showing it as 35 bytes.
> Looking inside the symlink in a windows text editor showed the following
> 35 byte string: "!<symlink>/usr/bin/cygperl5_14.dll" (no trailing \n).
> "/usr/bin/cygperl5_14.dll" is 24 bytes so the numbers are explained.
> So I'm wondering: Is this by design (presumably to be consistent with
> POSIX or Linux)
Yes. The size of a symlink is supposed to be the length of the path
the symlink is pointing to.
> or is it just the way it worked out? (Or both?) Are
> there other cygwin situations where ls doesn't report the actual size
> on disk?
Yes. All dirs are given a size of 0 explicitely to circumvent a curious
behaviour of the NTFS driver, see comment in fhandler_disk_file.cc,
lines 527ff(*). Special device entries, local sockets or named pipes
have a size of 0 even if the underlying file representing the device has
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
More information about the Cygwin