It is currently Tue, 07 Dec 2021 02:35:10 GMT

Author Message
 /bin/ls and /bin/echo * same or not?


Anybody had an expirience when
    rm -rf *
doest clean the directory? I dont mean dot files.

The shell (tcsh) doesnt expand star "*" correctly. VERY often
missing some files:

matveev/etc> ls
ClearCase  hosts  nokia  phones  roesch.dialin
matveev/etc> echo *
ClearCase hosts phones roesch.dialin

Something is missing, eh?

Bash seems to be a bit more consistent BUT it doesnt complete
(list) all names (TAB key doesnt work as expected).

It looks like some caches are inconsitent. But I have
no idea what caches and where to look for it. Never had such
an expirience.

This is SuSE 7.2 *based* diskless system, 2.4.4, root partition on /dev/ramdisk
and /usr and /home are mounted via NFS (this may be important).
There are some caching daemons running (nscd, kupdated) but
the first is a *name* caching daemon, what the second is good for  -- no idea.

Any comment where to look for solution or understanding the problem


Alexei Matveev

 Fri, 16 Jan 2004 17:13:58 GMT   
 /bin/ls and /bin/echo * same or not?
In comp.os.linux.misc Alexei Matveev <> wrote:

        They definitely should be the same.  Hard to say without more
investigation what it is, but try these commands to see if anything odd
shows up:
find . -maxdepth 1  (and see which one it matches)
file *
/bin/ls -1 | xargs file  (see if anything is of an unusual type)

If nothing obvious shows up, try umount'ing and fsck'ing the filesystem.
Checksum your binaries and compare them to a list of checksums stored

        It could be something serious (a lot of rootkits include versions
of common utilities that hide evidence of the breakin) or it could be
nothing (I was once stumped by a file that showed up in find and echo but
not ls - it turned out that ls was using colors, and was printing the name
in white on a white background!)

If mail to me bounces, try removing the "+STRING" part of the address.

 Sat, 17 Jan 2004 04:54:33 GMT   
   [ 2 post ] 

Similar Threads

1. FTP keeps using /usr/bin/ls and not ~/ftp/bin/ls

2. /usr/bin/ls /usr/ucb/ls /usr/local/bin/ls

3. /usr/bin/ls and /usr/xpg4/bin/ls report different file attributes

4. % /bin/sh -c /bin/ls -l -R ???

5. /bin /usr/bin /usr/local/bin etc

6. /cgi-bin/phf /cgi-bin/test-cgi /cgi-bin/handler

7. Q: What echoes faster than /bin/echo?

8. echo -n not working in /bin/sh

9. /bin/echo which does not strip leading/trailing spaces

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software