Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ls * not working

319 views
Skip to first unread message

Disco Octopus

unread,
Nov 13, 2007, 4:57:19 PM11/13/07
to
Hi,

On my AIX I am unable to show listings with 'ls' on particular mounted
devices.

'ls' by itself works fine.

... however, 'ls *' does not find any files.

I am not the administrator of this server or the mounted devices. I am
just the lowly developer who uses this resource, however, our admin
guys have not found the problem, so I thought I might ask my friendly
usenet group :) to see if you have any ideas on this.

Thanks

Disco Octopus

unread,
Nov 13, 2007, 5:26:00 PM11/13/07
to

Upon further playing, it appears that it is not in fact the 'ls'
command. When I do 'cat *' it also doe not work. So, there is
something wrong with the '*' (asterisk)?
How can this be? And... it appears that the '?' (question mark) is
also displaying the same problems. Simply not working.

So... given that the file 'abc.csv' absolutely exists, when I simply
'ls' I can see the file. When I 'ls abc.csv' I also see the file.
When I 'ls ab*' I see no results. When I 'ls abc.???' I see no
results. Also, replacing 'ls' with 'cat' I also get the same bad
behaviour'.

Any ideas?

Thanks

Mark Taylor

unread,
Nov 13, 2007, 5:31:18 PM11/13/07
to
jfs or jfs2 ((probably antiquated jfs right)) ?

find /some_dir | wc -l ## more than 1000 ?

ls will do a readdir, ls * will open the inode .. perf issue, jfs is
crap .. jfs2 isnt much better ;) .. actually, it is perf wise because
it uses btree architecture, but it has a gaping hole with readdir
which is fixed in aix 5.4 (aix6).

HTH
Mark Taylor


Disco Octopus

unread,
Nov 13, 2007, 5:39:48 PM11/13/07
to
On Nov 14, 8:57 am, Disco Octopus <discoocto...@gmail.com> wrote:

(not sure if my response was sent correctly. Apologies if sent
twice...)
Hi,
Further playing suggests that.....
* Not only '*' (asterisk) is failing, but '?' (question mark) also
failing.
* Not only 'ls' failing with wildcards, but 'cat' also failing with
wildcards.

So...
Given that abc.txt exists....
This Works: ls abc.txt
This does not work: ls ab*
This does not work: ls abc.???
(also replacing 'ls' with 'cat' displays the same bad behaviour).

Thanks

Steve Thompson

unread,
Nov 13, 2007, 5:50:05 PM11/13/07
to
On Tue, 13 Nov 2007, Disco Octopus wrote:

> Given that abc.txt exists....
> This Works: ls abc.txt
> This does not work: ls ab*
> This does not work: ls abc.???
> (also replacing 'ls' with 'cat' displays the same bad behaviour).

Globbing is turned off?

-s

rkrite

unread,
Nov 13, 2007, 6:04:31 PM11/13/07
to

Hi Mark,
Thanks for reponse.

There is many more than 1000 files on this device. About 15000 files
actually.

I did a 'set -o xtrace' and found that my wildcard are actually not
being expanded.

I wonder why this would be. It is only happenning on this paricular
mounted device.

rkrite

unread,
Nov 13, 2007, 6:07:35 PM11/13/07
to

"Globbing"? I am not familiar with this.

Even more playing finds that when I 'set -o xtrace' I notice that no
wildcards are being expanding at all on this device. Does this have
something to do with "Globbing"?

Thanks

Daniel Rock

unread,
Nov 13, 2007, 6:11:26 PM11/13/07
to
Disco Octopus <discoo...@gmail.com> wrote:
> (not sure if my response was sent correctly. Apologies if sent
> twice...)
> Hi,
> Further playing suggests that.....
> * Not only '*' (asterisk) is failing, but '?' (question mark) also
> failing.
> * Not only 'ls' failing with wildcards, but 'cat' also failing with
> wildcards.

# ls *
{many many files}
# set -o noglob
# ls *
*: No such file or directory
# set +o noglob
# ls *
{many many files again}

--
Daniel

Disco Octopus

unread,
Nov 13, 2007, 6:36:05 PM11/13/07
to
On Nov 14, 10:11 am, "Daniel Rock" <v200...@deadcafe.de> wrote:

Thanks Daniel,

I have tested this and it does not seem to work on that device.
However it does work on other devices that are no giving me the
problem.

Thanks

David J Dachtera

unread,
Nov 13, 2007, 8:45:32 PM11/13/07
to

Can I assume that "echo *" also returns nothing?

--
David J Dachtera
dba DJE Systems
http://www.djesys.com/

Disco Octopus

unread,
Nov 13, 2007, 9:00:21 PM11/13/07
to
On Nov 14, 12:45 pm, David J Dachtera <djesys...@spam.comcast.net>
wrote:

Actually, echo * returns...
*
... like this....

# set -o xtrace
# echo *
+ echo *
*
#


jp

unread,
Nov 14, 2007, 4:54:41 AM11/14/07
to
> #- Hide quoted text -
>
> - Show quoted text -

What happens if you do:
ls -leai "\*"

You might have a file that is named "*???" that you do not have access
to it ?!

a...@mail.com

unread,
Nov 14, 2007, 8:24:21 AM11/14/07
to

also possible:
you dont have (rx) permission on the directory itself that you are in.
you dont have (rx) permission on the parent directory of that which
you are in.
you dont have (rx) permission on the underlying directory of the
filesystem that you have mounted.

Mark Taylor

unread,
Nov 14, 2007, 9:45:53 AM11/14/07
to
>>There is many more than 1000 files on this device. About 15000 files actually.

then that is your issue ..

limit the number of files in a dir, or migrate to jfs2

Rgds
Mark Taylor

Disco Octopus

unread,
Nov 14, 2007, 3:55:42 PM11/14/07
to

Hi Mark,

But these files are split across many folders within the directory
structure. There may only be one or two or a dozen files in a given
sub directory of this mounted device. All directories and sub
directories are displaying this problem.

Thanks

Disco Octopus

unread,
Nov 14, 2007, 4:01:17 PM11/14/07
to

Thanks JP,

This ls command gives me the same result... "ls: 0653-341 The file \*
does not exist."

There is definitely no irregularly named file in the directory, as
this problem occurs everywhere within the structure of this mounted
device

After some playing, it is apparent that when wildcards are used on
that mounted device, no wildcards are being expanded. However, it is
working correectly on parent directories that are not this mounted
device.

Thanks

Disco Octopus

unread,
Nov 14, 2007, 4:03:02 PM11/14/07
to

All permissions seem fine. I am owner of the directory, the parent,
the files, etc, and I have tested these with 777 on all in the tree.

a...@mail.com

unread,
Nov 14, 2007, 4:36:19 PM11/14/07
to

if I create a file called "*", it gives the same response. just in
case, try:
ls -leai \*
without the quotes.

a...@mail.com

unread,
Nov 14, 2007, 4:41:22 PM11/14/07
to

also, what about giving some info about the device.. df -g, mount,
lsfs, etc..

Disco Octopus

unread,
Nov 14, 2007, 5:19:53 PM11/14/07
to

Here are results from lsfs, mount , and df for the device in
question...

# lsfs
Name Nodename Mount Pt VFS Size
Options Auto Accounting
/VOL1/SBDUXLH6 kognwap12 /apps/mlsbeta/import nfs --
rw,bg,soft,intr,grpid,retry=5,vers=3 yes no


# mount
node mounted mounted over vfs date
options
-------- --------------- --------------- ------ ------------
---------------
kognwap12 /VOL1/SBDUXLH6 /apps/mlsbeta/import nfs3 Nov 14 15:48
rw,bg,soft,intr,grpid,retry=5,vers=3


# df -g .
Filesystem GB blocks Free %Used Iused %Iused Mounted on
kognwap12:/VOL1/SBDUXLH6 60.00 24.54 60% 283033 60% /
apps/mlsbeta/import

Henry

unread,
Nov 14, 2007, 5:45:23 PM11/14/07
to

not sure if I'm seeing this right, but it's an NFS Filesystem ?
An NFS Filesystem of any size is just all wrong, but a 60 GB one ?
I completely agree with the advise about moving to JFS2. The number of
inodes being used is also massive.
I've had problems with "ls" failing too, it was all down to the
reasons alluded to by others.

Disco Octopus

unread,
Nov 14, 2007, 6:18:01 PM11/14/07
to

Thanks Henry,

I didn't think that having a NFS would cause this. We have been using
this for years.
This device is shared across different platforms, but it has been for
years.

It is only the past week that things started going weird.

I am not sure what you mean by "An NFS Filesystem of any size is just
all wrong".

Thanks

Henry

unread,
Nov 14, 2007, 9:19:31 PM11/14/07
to

NFS is an insecure TCP protocol.
You're right, weird that it's been working, and now isn't. But this is
a LOT of inodes.
Where/what is the NFS hosted on?

Thomas Braunbeck

unread,
Nov 15, 2007, 3:21:52 AM11/15/07
to
Disco Octopus schrieb:

> # mount
> node mounted mounted over vfs date
> options
> -------- --------------- --------------- ------ ------------
> ---------------
> kognwap12 /VOL1/SBDUXLH6 /apps/mlsbeta/import nfs3 Nov 14 15:48
> rw,bg,soft,intr,grpid,retry=5,vers=3

I didn't follow this thread (I'm not sure which ls is working,
only know ls using wildcards has trouble).
NFSV3 has a readdirplus (and the normal readdir). You may ckeck
the AIX docu for nfs_v3_server_readdirplus (nfso command to change
the setting to disable nfs_v3_server_readdirplus).
nfsstat -c may have some useful data.
Then you may use iptrace to see if the readdir/readdirpuls gets
to the server and if the server returns some data. But here I'm
not able to provide you more details. On NFS/TCPIP I know just
enough to use it, sorry.

Thomas

Mark Taylor

unread,
Nov 15, 2007, 4:39:41 AM11/15/07
to
Ok, sorry .. the device is nfs and there are a few dozen files per
dir .. thats ok then .. right .. next step ..where are u nfs mounting
from ? go to that system and see if the problem exists locally there
on the exported filesystem to rule that out (local disk / h/w / perms
issue) .. if there is no problem there, then try mounting that nfs
filesystem on another host and see if you get the same issue (nfs
server issue) .. if all still ok, then look at any changes made /
patches / errors in the errpt on the system where the problem exists
because it worked and now it doesnt.

Rgds
Mark Taylor

jp

unread,
Nov 15, 2007, 5:10:36 AM11/15/07
to
> Thanks- Hide quoted text -

>
> - Show quoted text -

I've had a similar situration (probably not exactly the same).

please let us know the following results:

#ls -ld /<fsystem>
#unmount /<fsystem>
#ls -ld /<fsystem/mounting point>
the permissions here (mounting point) could be a bit different from
the file system once mounted.
Make sure you can
# cd <fsystem/mounting point>
# cd /
#mount <fsystem>

Disco Octopus

unread,
Nov 15, 2007, 5:29:08 AM11/15/07
to
Disco Octopus wrote:
> Hi,
>
> On my AIX I am unable to show listings with 'ls' on particular mounted
> devices.
>
> 'ls' by itself works fine.
>
> .... however, 'ls *' does not find any files.

>
> I am not the administrator of this server or the mounted devices. I am
> just the lowly developer who uses this resource, however, our admin
> guys have not found the problem, so I thought I might ask my friendly
> usenet group :) to see if you have any ideas on this.
>
> Thanks
>

Hi all,

Thanks all for your interest and help in finding what was causing our
problems. As I mentioned, I am not the administrator, just a lowly dev
guy on the end of this problem. ... Our unix admin guys had taken this
problem to IBM, and over the last couple of days they seem to have
identified a bug in ksh for 8.2

So... thanks again for all your input.

--
Disco Octopus
www.choicebeefjerky.com.au

Hajo Ehlers

unread,
Nov 15, 2007, 5:56:12 AM11/15/07
to
On Nov 13, 11:26 pm, Disco Octopus <discoocto...@gmail.com> wrote:

> On Nov 14, 8:57 am, Disco Octopus <discoocto...@gmail.com> wrote:
>
> > Hi,
>
> > On my AIX I am unable to show listings with 'ls' on particular mounted
> > devices.
>
> > 'ls' by itself works fine.
>
> > ... however, 'ls *' does not find any files.
>
> > I am not the administrator of this server or the mounted devices. I am
> > just the lowly developer who uses this resource, however, our admin
> > guys have not found the problem, so I thought I might ask my friendly
> > usenet group :) to see if you have any ideas on this.
>
> > Thanks
>
> Upon further playing, it appears that it is not in fact the 'ls'
> command. When I do 'cat *' it also doe not work. So, there is
> something wrong with the '*' (asterisk)?
> How can this be? And... it appears that the '?' (question mark) is
> also displaying the same problems. Simply not working.
>
> So... given that the file 'abc.csv' absolutely exists, when I simply
> 'ls' I can see the file. When I 'ls abc.csv' I also see the file.
> When I 'ls ab*' I see no results. When I 'ls abc.???' I see no
> results. Also, replacing 'ls' with 'cat' I also get the same bad
> behaviour'.
>
> Any ideas?
>
> Thanks

an
$ ls .
simply does an file open on the directory inode
Example from a
$ truss -af ls .
...
1097896: statx(".", 0x2FF22780, 76, 0) = 0
1097896: open(".", O_RDONLY) = 3
1097896: getdirent(3, 0x200030E8, 4096) = 368
1097896: lseek(3, 0, 0) = 0
...

where by an
$ ls *
the * (star ) gets expanded by the current shell.
To disable this behaviour the noglob option can be set.

So for trouble-shooting ( You must be a ksh user ! )
1) Check that you are an ksh user
$ echo
$SHELL
/usr/bin/ksh

2) Check if the noglob option is set or not
$ set +o
$ set +o | grep glob

3)
Run the following commands on an almost empty directory which does not
contains a file named *
$ cd MyDir ;\
export LANG=C ;\
truss -af echo * ;\
truss -af ksh -c echo \*

Supply the output of all commands.

hth
Hajo

Disco Octopus

unread,
Nov 15, 2007, 7:24:52 AM11/15/07
to
Hi Hajo,

It was found that the ksh for 8.2 has a bug. I think it is specifically
in regards with NFS devices.

Although not resolved for us, at least we know what the problem is.

Thanks

--
Disco Octopus
www.choicebeefjerky.com.au

David J Dachtera

unread,
Nov 17, 2007, 12:18:21 PM11/17/07
to

"8.2" ??? I though AIX was only out to V6.x ...

--
David J Dachtera
dba DJE Systems
http://www.djesys.com/

Unofficial OpenVMS Marketing Home Page
http://www.djesys.com/vms/market/

Unofficial Affordable OpenVMS Home Page:
http://www.djesys.com/vms/soho/

Unofficial OpenVMS-IA32 Home Page:
http://www.djesys.com/vms/ia32/

Unofficial OpenVMS Hobbyist Support Page:
http://www.djesys.com/vms/support/

Henry

unread,
Nov 22, 2007, 5:53:30 PM11/22/07
to
On Nov 18, 6:18 am, David J Dachtera <djesys...@spam.comcast.net>
wrote:

> Disco Octopus wrote:
>
> > Disco Octopus wrote:
> > > Hi,
>
> > > On my AIX I am unable to show listings with 'ls' on particular mounted
> > > devices.
>
> > > 'ls' by itself works fine.
>
> > > .... however, 'ls *' does not find any files.
>
> > > I am not the administrator of this server or the mounted devices. I am
> > > just the lowly developer who uses this resource, however, our admin
> > > guys have not found the problem, so I thought I might ask my friendly
> > > usenet group :) to see if you have any ideas on this.
>
> > > Thanks
>
> > Hi all,
>
> > Thanks all for your interest and help in finding what was causing our
> > problems. As I mentioned, I am not the administrator, just a lowly dev
> > guy on the end of this problem. ... Our unix admin guys had taken this
> > problem to IBM, and over the last couple of days they seem to have
> > identified a bug in ksh for 8.2
>
> "8.2" ??? I though AIX was only out to V6.x ...
>
> --
> David J Dachtera
> dba DJE Systemshttp://www.djesys.com/
>
> Unofficial OpenVMS Marketing Home Pagehttp://www.djesys.com/vms/market/

>
> Unofficial Affordable OpenVMS Home Page:http://www.djesys.com/vms/soho/
>
> Unofficial OpenVMS-IA32 Home Page:http://www.djesys.com/vms/ia32/
>
> Unofficial OpenVMS Hobbyist Support Page:http://www.djesys.com/vms/support/

ksh

0 new messages