Any way to stop a remote box gone crazy?
Dan Nelson
dnelson at allantgroup.com
Wed Jul 23 15:34:46 PDT 2003
In the last episode (Jul 23), Dan Nelson said:
> In the last episode (Jul 23), sedwards at qrwsoftware.com said:
> > But I would think that this means the shell couldn't open the
> > directory to get the filenames to match?
>
> That's also a possibility. You can use cat to tell the difference
> though.. Here's a "ls" shell function that knows the difference
> between an empty directory and one it can't read. Unfortunately, it
> requires cat, whereas plain "echo *" is done without forking:
>
> ls () { cat . > /dev/null && echo * ; }
Heh. I knew there was a way :)
ls () { < . > /dev/null && echo * ; }
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-questions
mailing list