From owner-freebsd-current@FreeBSD.ORG Fri Oct 21 16:31:03 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCFFD106564A for ; Fri, 21 Oct 2011 16:31:03 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 951138FC0C for ; Fri, 21 Oct 2011 16:31:03 +0000 (UTC) Received: by iaky10 with SMTP id y10so6089711iak.13 for ; Fri, 21 Oct 2011 09:31:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KMdDzxnxVfSob1zky7iGFUOIJcme0NxCGkUFib96C4U=; b=wfyrK6CsVJ0GuECIV+eBoJ/XKuXoRurn5RXd13SoHKkTOJreTZ8tq0tmdd+MdchCxi 0QeVEBLCHISzJfvpEqkwNVy810kBawR+j3UybHY4+etMfaRBZjRxbM/4MvO/h3aTVB/Y EJKZaiWctyRzCS/Isx69pFr/ri+E4X154OE2M= MIME-Version: 1.0 Received: by 10.231.5.73 with SMTP id 9mr5906722ibu.60.1319214662903; Fri, 21 Oct 2011 09:31:02 -0700 (PDT) Received: by 10.231.166.15 with HTTP; Fri, 21 Oct 2011 09:31:02 -0700 (PDT) In-Reply-To: <20111021055252.GB25600@e-new.0x20.net> References: <4E9EE3AD.7080708@protected-networks.net> <867h41m1nu.fsf@ds4.des.no> <4E9EF40C.2020802@protected-networks.net> <20111019171901.GA12204@mech-cluster241.men.bris.ac.uk> <20111019184734.GA12364@mech-cluster241.men.bris.ac.uk> <20111020115132.GB13653@mech-cluster241.men.bris.ac.uk> <5C0DF765-370C-4B52-B070-CE2A13EAFD50@gsoft.com.au> <20111021055252.GB25600@e-new.0x20.net> Date: Fri, 21 Oct 2011 09:31:02 -0700 Message-ID: From: Kevin Oberman To: Lars Engels Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Current Subject: Re: '/bin/ls' broken by SVN r226509 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 16:31:03 -0000 On Thu, Oct 20, 2011 at 10:52 PM, Lars Engels wrote: > On Fri, Oct 21, 2011 at 09:00:47AM +1030, Daniel O'Connor wrote: >> >> On 20/10/2011, at 22:21, Anton Shterenlikht wrote: >> > On Thu, Oct 20, 2011 at 11:58:41AM +0100, Tom Evans wrote: >> >> On Wed, Oct 19, 2011 at 7:47 PM, Anton Shterenlikht wrote: >> >>> >> >>> Thanks. Can you also please remind >> >>> how to reinstall just /bin/ls, >> >>> without the "make buildworld"? >> >>> >> >> >> >> cp /rescue/ls /bin/ls >> > >> > oh.. of course. I've forgotten about /rescue. >> > In fact, I only had to use it once before. >> >> >> This is the crunched binary and is pretty big (unlikely to be an issue on a modern system though). >> >> You can do.. >> cd /usr/src/bin/ls >> make all install > > And as a workaround: "echo *" :) At work one of our standard questions for candidates for Unix admin postings was how you can get a listing of the files in a directory if ls(1) won't run. echo(1) was the official answer, but we got quite a number of other, perfectly valid ones, some quite inventive and some, like using awk and sed to format the directory file, were kind of awkward, but they all work. Since the interviewees were often not FreeBSD people, use of rescue was never suggested, although it's probably the easiest on a FreeBSD system. ls(1) with no options is such a basic operation that there are probably dozens of ways to do the job in shell, Perl, or Python. -- R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com