delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/09/23:49:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <42802F26.10802@bellsouth.net>
Date: Mon, 09 May 2005 22:48:54 -0500
From: "Charles D. Russell" <worwor AT bellsouth DOT net>
Reply-To: worwor AT bellsouth DOT net
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
MIME-Version: 1.0
To: cygwin cygwin <cygwin AT cygwin DOT com>
Subject: "ls" finds file1 but "ls file1" does not

 > Response 2 to Eric Blake:
 > Thanks. I forgot that unix had separate permissions for directories.
 > However, I have
 > now given myself all the permissions I know of and I still have the same
 > problem.
 >
 > EXAMPLE:
 >
 > $ ls ass*
 > ls: ass*: No such file or directory     <------BUT IT IS THERE
 >
 > $ ls -l
 > total 722
 > -rwxrwxrwx+   1 cdr      None        58614 Oct 12  1995  _index.htm*
 > -rwxrwxrwx+   1 cdr      None         2177 Oct 12  1995  assert.htm*

#Next thing to check - do you have shell globbing disabled or filtered?  
(For more info on

#these options, read `man bash'.)
#$ echo ignoring:$GLOBIGNORE options:$-
#$ shopt | grep glob
_______________
I haven't yet puzzled out these commands, but I'm forwarding the results 
anyway.
I doubt this is the problem, since similar results occur without 
globbing, and I can't imagine how my defaults could get mucked up.  The 
installation is several years old, apart from upgrades.

$ echo ignoring:$GLOBIGNORE options:$-
ignoring: options:himBH

$ shopt |grep glob
dotglob         off
extglob         off
nocaseglob      off
nullglob        off
________________

#If GLOBIGNORE includes *.htm or the builtin set includes -f, bash will 
not expand *, but
#instead looks for the literal file named "ass*", which does not exist.  
I'm also guessing
#that nullglob is off, otherwise bash would expand the failed * into no 
arguments at all,
#which would cause a full directory listing, rather than passing the 
literal string with *
#on to ls.
 _________________
Same problem occurs with no globbing (I was using * only to avoid 
spelling errors):

$ ls assert.htm
ls: assert.htm: No such file or directory

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


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019