This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: directory listing differences
- From: Shankar Unni <shankarunni at netscape dot net>
- To: cygwin at cygwin dot com
- Date: Tue, 05 Jun 2007 15:34:46 -0700
- Subject: Re: directory listing differences
- References: <46658B43.1060801@sgi.com>
Joseph Michaud wrote:
Administrator@HeadNode /cygdrive/c/windows/system32
$ ls -al tsdiscon.exe tsecimp.exe
ls: cannot access tsdiscon.exe: No such file or directory
That's probably because the file is exclusively locked, and the "stat"
performed by "ls" fails.
See if you see the file if you pass in the "-f" option to ls:
$ ls -f tsdiscon.exe tsecimp.exe
If you can, then this is the issue. Looks like CMD.EXE is able to
examine whatever it needs from such files, but stat() in the cygwin
library cannot (uses different APIs).
I see similar behavior in a file that PointSec drops in my C:\\
(PROT_INS.SYS). In fact, even "ls -f" is not able to get any info on
that file!
% cmd /c dir /AH c:\\prot_ins.sys
Volume in drive C has no label.
Volume Serial Number is A8B1-8402
Directory of c:\
03/22/2007 11:03 AM 2,097,152 PROT_INS.SYS
1 File(s) 2,097,152 bytes
0 Dir(s) 4,296,351,744 bytes free
% ls -ln c:\\prot_ins.sys
ls: cannot access c:\prot_ins.sys: Input/Output error
% ls -f c:\\prot_ins.sys
ls: cannot access c:\prot_ins.sys: Input/Output error
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/