This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: directory listing differences


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]