Red Hat Bugzilla – Bug 9444
command line wild card expansion
Last modified: 2008-05-01 11:37:54 EDT
The complaint is always "/usr/bin/ls: *: No such file or directory"
and the same if /bin/ls is first "/bin/ls: *: No such file or directory"
or "... .bashr?: No..."
The problem is NOT an ls or less problem, although that was my first
thought; I have since compiled old source from my archives.
login as user; ls * doesn't work. ls .bashr? doesn't work.
as user su to user, entering password. ls * works. ls .bashr? works.
login as root; ls * doesn't work! su to root, no password; ls * works.
login as root; su to to user; ls * doesn't work.
the same wild card expansion problem exists for 14.7 and 2.0 Bash.
the same wild card expansin problen exists for linux-2.2.13
Compiling without networking: same problem, but PAM warning at login.
This box has an Intel Pentium MMX 233MHz processor w/i430 VX chip set
There are 2 HDD, 1 Creative CD-ROM, 1 5-1/4" and 1 3-1/2" floppy drives,
Adaptec 1460B SCCSI driving 1 Philips Omniwriter. 4 PCI and 4 ISA slots,
128MB DRAM, 512KB cache. AWE-64 value, Matrox Millennium II, 56K v.90 w/TI
chipset, Antec Descartes PCMCIA types I - IV, Viewsonic 15GA monitor.
login is to the vt-100 ascii screen of the monitor. The same problems exist
on the X screens using AnotherLevel.
This is probably not a 'kernel' bug; I've recompiled the kernel from CD-ROM 2
source and as 2.2.13 from kerneli source. The problem persists. I do not know
enough about the relationship between the kernel and the security and
permissions of RedHat to make a judgement as to whether its kernel or PAM that's
causing the problem.
This bug is one from a bash alias file.
The expansion symbol $@ doesn't work correctly.
as in: <alias ls='/bin/ls -aFC $@'>
<alias ll='/bin/ls -aFCl $@'>
<alias lsd='/bin/ls -FC $@'>
<alias lld='/bin/ls -FCl $@'>
It wont expand the wild card. It only enterprets a text follower on the command
Using $* does the expansion for both the wild card and text following.
However, what changed from 5.2 and 6.0 to cause this to happen????
That original worked perfectly well for the wild card and text in those
I can't reproduce this in the current version.
Aside from that, you don't ever need to use $@ in an alias; just alias
ls='/bin/ls -aFC' has the exact same effect.