delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/05/18/22:05:49

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.8 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Date: Wed, 18 May 2011 18:57:11 -0700
From: Keith Thompson <kst AT mib DOT org>
To: cygwin AT cygwin DOT com
Cc: Keith Thompson <kst AT mib DOT org>
Subject: Windows 7: stat /cygdrive/D/nosuchfile yields garbage
Message-ID: <20110519015711.GA25943@nuthaus.mib.org>
Mime-Version: 1.0
User-Agent: Mutt/1.4.2.2i
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

I'm using Cygwin (version 1.7.9-1 of cygwin1.dll) on Windows 7
on a Dell laptop.  Cygwin is installed in C:\cygwin.

I should mention that I have a second Cygwin installation on
the same laptop; it's in C:\apps\cygwin, and has version 1.7.5-1
of cygwin1.dll.  I understand that having more than one Cygwin
installation on a Windows box is not supported, and if that's likely
to be the cause of this problem I won't complain.  But if anyone
else has seen similar behavior with a supported configuration,
it should probably be looked into further.

C: is my hard drive.  D: is my CD/DVD drive, which currently has no
disk in it.

When I stat a nonexistent file under /cygdrive/D, I get nonsensical
results (huge sizes, strange timestamps) rather than an error
message.  I don't have this problem with /cygdrive/C, or with files
that actually exist.  I haven't tried stat'ing an existing file on
a CD or DVD.

To (try to) reproduce the problem, run "stat /cygdrive/D/nosuchfile",
where D is the drive letter of a CD/DVD drive with no disk.

$ stat /cygdrive/C
  File: `/cygdrive/C'
  Size: 0               Blocks: 8          IO Block: 65536  directory
Device: 8eacaecch/2393681612d   Inode: 1407374883553285  Links: 1
Access: (0000/d---------)  Uid: (4294967295/????????)   Gid: (4294967295/????????)
Access: 2011-05-17 19:45:43.031255600 -0700
Modify: 2011-05-17 19:45:43.031255600 -0700
Change: 2011-05-17 19:45:43.031255600 -0700
 Birth: 2010-08-04 04:31:46.000000000 -0700
$ stat /cygdrive/C/nosuchfile
stat: cannot stat `/cygdrive/C/nosuchfile': No such file or directory
$ stat /cygdrive/D
  File: `/cygdrive/D'
  Size: 0               Blocks: 39733916869668 IO Block: 65536  directory
Device: f7h/247d        Inode: 15880182543701391270  Links: 1
Access: (0755/drwxr-xr-x)  Uid: (1327634/keithomp)   Gid: (10513/Domain Users)
Access: 1904-03-30 18:03:12.-225685200 
Modify: 2002-02-22 02:59:30.-723071800 
Change: 2002-02-21 05:02:23.-173928600 
 Birth: -
$ stat /cygdrive/D/nosuchfile
  File: `/cygdrive/D/nosuchfile'
  Size: 6998845471659838504     Blocks: 44681719195812 IO Block: 65536  regular file
Device: f7h/247d        Inode: 13112919551903554218  Links: 1
Access: (0644/-rw-r--r--)  Uid: (1327634/keithomp)   Gid: (10513/Domain Users)
Access: 1904-03-30 18:03:12.-225685200 
Modify: 2018-03-14 05:28:48.-643891000 
Change: 2018-03-13 07:31:42.-976783000 
 Birth: -
$ 

-- 
Keith Thompson (The_Other_Keith) kst AT mib DOT org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

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