From owner-freebsd-questions@FreeBSD.ORG Wed Jul 23 15:13:31 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 A447137B401 for ; Wed, 23 Jul 2003 15:13:31 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00C9E43F3F for ; Wed, 23 Jul 2003 15:13:31 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h6NMDU24081214; Wed, 23 Jul 2003 17:13:30 -0500 (CDT) (envelope-from dan) Date: Wed, 23 Jul 2003 17:13:30 -0500 From: Dan Nelson To: sedwards@qrwsoftware.com Message-ID: <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1058997629.3f1f057d216d3@webmail.xmission.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:13:32 -0000 In the last episode (Jul 23), sedwards@qrwsoftware.com said: > Quoting Dan Nelson : > > In the last episode (Jul 23), Rus Foster said: > > > > cd seems to work (I can cd to directories that I know exist, > > > > but get an error if I try to cd to a directory that doesn't), > > > > but echo always just returns * > > > > > > hmm strange...it could be the shell as echo * on mine does and ls > > > > "echo *" in an empty directory will print "*", since /bin/sh passes > > unmatched patterns through. > > > > -- > > Dan Nelson > > dnelson@allantgroup.com > > > > 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 * ; } -- Dan Nelson dnelson@allantgroup.com