This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: "ls" finds file1 but "ls file1" does not
- From: ericblake at comcast dot net (Eric Blake)
- To: worwor at bellsouth dot net, cygwin cygwin <cygwin at cygwin dot com>
- Date: Mon, 09 May 2005 22:45:12 +0000
- Subject: Re: "ls" finds file1 but "ls file1" does not
> Response 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
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.
--
Eric Blake
--
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/