From owner-freebsd-questions@FreeBSD.ORG Wed Jul 23 15:34:46 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8113D37B401 for ; Wed, 23 Jul 2003 15:34:46 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id D047343F85 for ; Wed, 23 Jul 2003 15:34:45 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h6NMYjGi016214; Wed, 23 Jul 2003 17:34:45 -0500 (CDT) (envelope-from dan) Date: Wed, 23 Jul 2003 17:34:45 -0500 From: Dan Nelson To: sedwards@qrwsoftware.com Message-ID: <20030723223445.GB61570@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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030723221330.GA61570@dan.emsphone.com> X-OS: FreeBSD 5.1-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: freebsd-questions@freebsd.org Subject: Re: Any way to stop a remote box gone crazy? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2003 22:34:46 -0000 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