ls * problem

Will Mc Donald wmcdonald at ntlworld.com
Tue Jun 29 07:57:32 UTC 2004


A quick Google would imply you're using csh or tcsh. csh returns the "No match" error when globbing fails. I don't *think* this is a problem with the kernel versions, that's probably just coincidence.

Perhaps there's a filename with a character in that your shell is trying to expand. Try "echo *" in that directory and see what happens. Also, try "ls -al" to see if there are any .dot files with strange charatcers in them.

If it's actually ls misbehaving rather than a shell thing then:

rpm -qf `which ls`

Will tell you which package ls is from, compare that to the working machines just to check. If the version of fileutils (the package ls comes from) is the same on either type of machine, md5sum ls to make sure it's the same on both boxes.

md5sum `which ls`

You could also try switching into a different shell and trying the same command in the hope it'll give you a more informative error message.

Will.

----- Original Message ----- 
From: <Andrew.Bridgeman at corusgroup.com>
To: "Will Mc Donald" <wmcdonald at ntlworld.com>; "General Red Hat Linux discussion list" <redhat-list at redhat.com>
Sent: Monday, June 28, 2004 4:30 PM
Subject: Re: ls * problem


> 
> Thanks for the reply.
> 
> There are definitely files in there as i am looking at a directory on one
> of our main servers as per text below. When i do exactly the same as below
> on Redhat version 2.4.2 i get the right output from ls *. I have checked
> the aliases on both machines and they are both identical. I am not sure
> what you mean by the bin/ls part below but i do have a ls in /bin, can you
> expand on this and also let me know your thoughts on the above. Thanks
> 
> lin2:86) pwd
> /projects/1518/crash/r75_tb32/mod13
> lin2:87) ls
> abstat     mod13.key    mod13.ptf09   mod13.ptf11   mod13.ptf21
> mod13.ptf33  mod13.ptf45  mod13.ptf57  mod13.ptf69  mod13.ptf81
> mod13.ptf93  part_des
> lin2:88) ls *
> ls: No match.
> lin2:89) id
> uid=1113(marka) gid=20(user)
> groups=20(user),993(demo),360(bs_1253),1323(1323),1345(1345),1363(1363),1518(1518),1386(1386),1409(1409),1265(1265),1508(1508),1426
> 
> |---------+------------------------------>
> |         |           "Will Mc Donald"   |
> |         |           <wmcdonald at ntlworld|
> |         |           .com>              |
> 
> 
> From: <Andrew.Bridgeman at corusgroup.com>
> > As per list below i have 9 Redhat machines running version  2.4.18 and 7
> > Redhat machines running 2.4.2. I have been having a problem with my
> 2.4.18
> > machines in that when i do a ls * on some directories i get a messages
> > saying " No Match" but if i go to the same area on my 2.4.2 machines it
> > just lists the files fine as you would expect it too. I had a look into
> it
> > a bit and found a rpm package called lsof. On my 2.4.18 machines i have
> > lsof -4.51-2 and on my 2.4.2 machines i have lsof-4.51-1 which means that
> > the later version of lsof seems to have the problem. I do not think i can
> > go back to 4.51.1 on Redhat from a newer version, so has any body come
> > across this problem and if so what did you do to fix it .I would be
> > grateful for some instructions on the fix as well  if possible?
> 
> lsof's not really anything to do with plain old ls. lsof ListS all Open
> Files in the system, including things like sockets, devices etc. (In Unix
> everything's a file.)
> 
> Check that there are actually files in the directory you're receiving the
> "No Match" message. cd into the directory and just type ls without the *
> and see what that shows. Also check that you're running /bin/ls and it's
> not aliased to something without you knowing. (Type "alias" to see what
> aliases are already setup.)
> 
> Will.
> 
> 





More information about the redhat-list mailing list