Re: Bizarre ls Behavior
Hendrik Sattler writes:
>Guessing: your $PATH contains "." before the "/bin"
>Bad thing!
>When in doubt: run /bin/ls instead of ls.
Wow! I've been doing UNIX for around 14 years and am flat
ashamed of myself. I have now put . at the end of the path and, of
course it all works. I have heard before that putting ones current
working directory first is bad, but I never quite understood why
because the examples I had heard were kind of a stretch in many cases
but this one shines like a light.
As I originally said, these were all FreeBSD executables meant
to be the /bin file system for use in a rescue setting. I just wanted
to look at them to make sure the image I had down-loaded was the right
one to use on some FreeBSD systems at work. I just wasn't thinking at
all about the fact that the ls application in that directory would
certainly pipe up and try to run when I called for ls. Oddly enough,
it silently exits. Some of the other executables like date dump core
since they weren't designed to work in Linux.
I think that is the first time I have ever been bitten by
putting the current WD first but it is a great lesson.
Thank you even if I am a bit red in the face.
Martin McCormick WB5AGZ Stillwater, OK
OSU Information Technology Division Network Operations Group
Reply to: