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: ls -F // doesn't work


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/
> >cron_diagnose.sh* 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: //cron_diagnose.sh: 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

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.

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