"ls" finds file1 but "ls file1" does not

Charles D. Russell worwor@bellsouth.net
Tue May 10 06:42:00 GMT 2005


Eric Blake wrote:
 So next, check:

$ type ls
$ alias ls
___________________
$ type ls
ls is aliased to `ls -aF'

$ alias ls
alias ls='ls -aF'
______________

Maybe you have an alias/function for ls that includes the --hide='*.htm' 
option, so that ls is doing the filtering (and not bash, like I guessed 
before).  Also, you can escape the program name to overcome the alias - 
try this:

$ \ls as*
_______________
$ \ls assert.htm
ls: assert.htm: No such file or directory

$ \ls as*   
ls: as*: No such file or directory
___________________________

If it still fails, then it is back to permissions problems that are 
beyond me - your new ACLs don't seem to show any problems.  One last 
possibility is whether you have a Windows setting that auto-bundles html 
files into an invisible directory, so that when cygwin tries to list the 
directory contents, it gets a different list then directly spelling the 
listed filenames.

 > By the way, where can I find documentation for the command
 > $ stat -c %A .
 > in your first post?  The only "stat" command I can find is a C system 
call.
 >
 > $ stat
 > bash: stat: command not found

What version of coreutils are you using?  Attach the output of `cygcheck 
-svr' as described in cygwin.com/problems.html, then consider 
upgrading.  It may also be an old version of cygwin that has since been 
fixed that is giving you the ls error.  stat(1) is provided by 
coreutils, as a nice wrapper around the stat(2) system call.  Once you 
have upgraded, `stat --help' or `info coreutils stat' will tell you more.

__________________
I am attaching cygcheck in case you can find something obvious. 
However,I am reluctant to upgrade because the use of large static 
fortran arrays with cygwin/g77 seems to be a fragile issue and my 
current installation is now working (but only with -mno-cygwin). From 
this mailing list, there is clearly a problem, but I have seen no 
explanation or remedy from the experts, just at best another user saying 
"this worked for me".
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050510/b22459b8/attachment.ksh>
-------------- next part --------------
--
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/


More information about the Cygwin mailing list