ls -F // doesn't work

Corinna Vinschen
Thu Dec 23 10:35:00 GMT 2004

On Dec 22 15:47, Andrew DeFaria wrote:
> Mark Paulus wrote:
> >When I do an ls -F, I get expected results:
> >$ ls -F /
> >bin/ cygwin.bat* home/ run.groff tmp1/ xfer/
> >* cygwin.ico* lib/ sbin/ usr/
> >cygdeb/ etc/ mountem* tmp/ var/
> >
> >However, when I do ls -F //, then I get bad results:
> >$ ls -F //
> >ls: //bin: No such file or directory
> >ls: // No such file or directory
> >[...]
> >wanted to mention it, as I am having 
> >another problem where rmdir() is not finding a file called 
> >"//usr/share/doc/cygwin-base/README". (should probably return ENOTDIR 
> >instead of ENOENT)
> In general, in Cygwin, "//" == "\\" which introduces a UNC path. So, in 
> a Windows CMD a "pushd \\server\share" is equivalent to "pushd 
> //server/share" in a bash shell. Therefore a path of 
> //user/share/doc/cygwin-base/README is saying "I want the file on the 
> machine 'usr' under the share point of 'share' with a path of 
> 'doc/cygwin-base/' and a filename of 'README'". I doubt that you have a 
> machine named "usr" hanging around... ;-)

While you're right, it's not a good thing that ls // returns these
error messages.  I found a buglet in Cygwin which results in scanning
the root directory accidentally in this situation.  


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader
Red Hat, Inc.

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list