delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/03/07/22:38:21

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:to:subject:content-type;
q=dns; s=default; b=hiYR9L9ZoI6zN6nM4GFoplg9o6S9Fb7Ov7pwWTia7h7
geIo3ptopPE02YC+Ky4QVQVnRpCXbO/UBe+VBTRbPQAw4z9oeLEJYj9fffqxlqoC
JUNIKV91xordSgQmfmBq3aFNk07nMFhGbtEnUH9oTCM9kGGPFateWoRXANCX65bs
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:to:subject:content-type;
s=default; bh=dR+zHCZzopqR3VTB79UTKUjrsog=; b=dKT0WTD0U4K9N8M1H
h5AB7SR099uE02wY0rzmQ/mpMK+3qs2836ddzdxSxM1ufq7u8BbH8NvSlr66HAmm
dx4GUPjhZ/16J5KWsuGym9oOAOD8C/a0RPo00Atey49asaZRPxq5Qm/4mEoyJCrl
Bm+uVv5lAGSHGC/8lzqNDIeKq0=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=CYGWIN, cmdexe, cmd.exe, UD:cmd.exe
X-HELO: mail-ot0-f178.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:to:subject:user-agent; bh=nk3386trhDq2VHQSmxS7/kWROPZ1AcGV2io3fpD0jpE=; b=c80n+y+cuYOmhH+51MTElAPzanhr9pa1GcdZtl7i6sXTb1Ou2IsAn/1uhBhYuVIqYK nl3tnPefB8YLR5KE0JNNgLGmwDWZPivJQqkKrcF/kyPV3wBc/isYRnL2n9sQEKXT/pMr XOKxsfxo4MnawhidiBDt0xAYY/HIva+x1Hi7o2mmaraO88Xs7CXXT/IAsDRcCJn+cpiK l4bmicwiHyy40Mb+QKCRCf9Xn+RYmUVW/QBRpfULnKMxSgWxqHVA/aptT1WKVpk5/bzQ 4shJkmJiNJoNygloAbVcEXq3s76yF2dRHrQO+KL8cxPDdUyHvboRlaXE1620YsCswB4m 1Kyg==
X-Gm-Message-State: AFeK/H0iG2dPLjB/0Mb8/1PJ/SH2zqOKoEztNtGPCFwjqqV8AV+cbIfVwDT3g0v7jrlVMw==
X-Received: by 10.157.0.8 with SMTP id 8mr2111631ota.107.1488944242289; Tue, 07 Mar 2017 19:37:22 -0800 (PST)
Message-ID: <58bf7c71.d5c5ca0a.98eda.56bd@mx.google.com>
Date: Tue, 07 Mar 2017 19:37:21 -0800 (PST)
From: Steven Penny <svnpenn AT gmail DOT com>
X-Google-Original-From: Steven Penny
To: cygwin AT cygwin DOT com
Subject: Symlink file size
User-Agent: Tryst/2.0.1 (github.com/svnpenn/tryst)

Cygwin seems to have no way to print an accurate size of a symlink. Consider
this command:

    $ touch alfa.txt
    $ CYGWIN= ln -s alfa.txt bravo.txt

Now cmd.exe can print the correct size just fine:

    > dir /AS
    2017-03-07  09:26 PM                30 bravo.txt

However Cygwin prints incorrect 8 bytes with ls:

    $ ls -l
    total 2
    -rw-r--r-- 1 Steven None 0 Mar  7 21:26 alfa.txt
    lrwxrwxrwx 1 Steven None 8 Mar  7 21:26 bravo.txt -> alfa.txt

and stat:

    $ stat --format %s bravo.txt
    8

and du:

    $ du -b bravo.txt
    8       bravo.txt

and find:

    $ find bravo.txt -printf %s
    8

wc seems to draw from the source file:

    $ wc -c bravo.txt
    0 bravo.txt

What gives?


--
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

- Raw text -


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