From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7992 invoked from network); 19 Oct 2008 06:40:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 19 Oct 2008 06:40:13 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 57884 invoked from network); 19 Oct 2008 06:40:02 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Oct 2008 06:40:02 -0000 Received: (qmail 13693 invoked by alias); 19 Oct 2008 06:39:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25917 Received: (qmail 13672 invoked from network); 19 Oct 2008 06:39:45 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 19 Oct 2008 06:39:46 -0000 Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by bifrost.dotsrc.org (Postfix) with ESMTPS id E651B80524C0 for ; Sun, 19 Oct 2008 08:39:30 +0200 (CEST) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id m9J6dPrm083666 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 19 Oct 2008 01:39:26 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id m9J6dO9D083650 for zsh-workers@sunsite.dk; Sun, 19 Oct 2008 01:39:24 -0500 (CDT) (envelope-from dan) Date: Sun, 19 Oct 2008 01:39:24 -0500 From: Dan Nelson To: zsh-workers@sunsite.dk Subject: Re: Notes on zsh, zsh/files and recovery Message-ID: <20081019063924.GO99270@dan.emsphone.com> References: <20081018204515.GA1642@redoubt.spodhuis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081018204515.GA1642@redoubt.spodhuis.org> X-OS: FreeBSD 7.1-PRERELEASE User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: ClamAV 0.92.1/8444/Sun Oct 19 05:03:07 2008 on bifrost X-Virus-Status: Clean In the last episode (Oct 18), Phil Pennock said: > Managed to hose my box by trying to be too clever while rebuilding. > Luckily, had zsh as root at the time. In the end, didn't help fix > it; once you've hosed /libexec/ld-elf.so.1 with a version that's for > a different architecture to the kernel, you're hosed. But it's an > interesting exercise, trying to recover without making use of exec() > (as opposed to the more usual fork() limitation). You mention FreeBSD later, so if something similar happens again, you should be able to use the statically-linked binaries in /rescue to recover from most shared-library problems, especially if you've got another system you can NFS-mount to copy files from. Surprisingly, ftp isn't in there, so if you need executables or libraries from ftp.freebsd.org you'd have to ftp them from another box and copy them via USB drive or something similar. > There does not appear to be a zls() ? I hacked one together using > zsh/stat and ... it's rather slow. I'm tempted to build up a closer > emulation of ls(1) with a few useful options and contribute it as a > standard function. It will be truly slow, but occasionally useful. In emergencies, I have used this as an ls replacement :) ls() { echo ${@:-*} } -- Dan Nelson dnelson@allantgroup.com