From owner-freebsd-newbies Thu Jun 25 09:55:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA09483 for freebsd-newbies-outgoing; Thu, 25 Jun 1998 09:55:09 -0700 (PDT) (envelope-from owner-freebsd-newbies@FreeBSD.ORG) Received: from pau-amma.whistle.com (s205m64.whistle.com [207.76.205.64]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA09464 for ; Thu, 25 Jun 1998 09:55:04 -0700 (PDT) (envelope-from dhw@whistle.com) Received: (from dhw@localhost) by pau-amma.whistle.com (8.8.8/8.8.8) id JAA03668 for newbies@freebsd.org; Thu, 25 Jun 1998 09:48:18 -0700 (PDT) (envelope-from dhw) Date: Thu, 25 Jun 1998 09:48:18 -0700 (PDT) From: David Wolfskill Message-Id: <199806251648.JAA03668@pau-amma.whistle.com> To: newbies@FreeBSD.ORG Subject: Re: vi In-Reply-To: <3.0.5.32.19980625023355.0080e9b0@mx.serv.net> Sender: owner-freebsd-newbies@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Date: Thu, 25 Jun 1998 02:33:55 -0700 >From: Tim Gerchmez >I still have serious doubts that I'll even run into a Unix system where vi >is the only editor accessible on the system.... Quite correct; I expect you'll have ed (and red). Whether or not you'll find ed more palatable than vi, of course, is a different matter.... :-) And, as has been pointed out earlier, there are situations where there is *no* editor available. True story: Seems I had clobbered the /etc/fstab file on my Sun 3/60 (SunOS 4.1.1_U1)... but I didn't realize it until the next reboot. And I didn't have install media. Since fstab wasn't there, the "mount-a" failed. Oh -- and in SunOS 4,x, /bin is a symlink to /usr/bin. This significantly reduced the available suite of tools.... Fortunately, /sbin/sh was there, so I had a command interpreter. "ls" wasn't around, so this made navigation tricky.... Another fortunate thing was that "echo" was a shell built-in. So "echo *" made a nearly passable replacement for "ls". Further, "echo" is what I ended up using to re-create a minimal fstab, in the form: echo "/dev/sd0a / 4.2 rw 1 1" >>/etc/fstab echo "/dev/sd0d /usr 4.2 rw 1 1" >>/etc/fstab Then re-boot -- this time, I had the stuff from /usr/bin -- and use a backup copy (everyone keeps backup copies handy, right?) of fstab to re-create the real fstab file. OK; granted: this is "newbies" -- but I believe it can be useful for folks to realize that others have made mistakes, got out of 'em, and lived to tell about it (and to tell others how they can extricate themselves, should they find themselves in such a position). Cheers, david -- David Wolfskill UNIX System Administrator dhw@whistle.com voice: (650) 577-7158 pager: (650) 371-4621 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message