X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Wed, 28 Nov 2012 10:08:25 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Symlink Size [was Rebase/Perl packaging problem?] Message-ID: <20121128090825.GE27915@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <0105D5C1E0353146B1B222348B0411A20AD854CBC9 AT NIHMLBX02 DOT nih DOT gov> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0105D5C1E0353146B1B222348B0411A20AD854CBC9@NIHMLBX02.nih.gov> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 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 . 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: "!/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 not. (*) http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_disk_file.cc?rev=1.380&content-type=text/x-cvsweb-markup&cvsroot=src Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple