On Thu, Oct 20, 2011 at 10:52 PM, Lars Engels <lars.eng...@0x20.net> 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 <me...@bristol.ac.uk> 
>> >> 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: kob6...@gmail.com
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to