Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jul 2003 17:34:45 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        sedwards@qrwsoftware.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Any way to stop a remote box gone crazy?
Message-ID:  <20030723223445.GB61570@dan.emsphone.com>
In-Reply-To: <20030723221330.GA61570@dan.emsphone.com>
References:  <1058981768.3f1ec788d0125@webmail.xmission.com> <1058995718.3f1efe06829fa@webmail.xmission.com> <1058996340.3f1f007432094@webmail.xmission.com> <20030723144439.C68935@thor.65535.net> <20030723215524.GF3178@dan.emsphone.com> <1058997629.3f1f057d216d3@webmail.xmission.com> <20030723221330.GA61570@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jul 23), Dan Nelson said:
> In the last episode (Jul 23), sedwards@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@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030723223445.GB61570>