Re: How to edit file in single user mode
Parv wrote: That reminds me of my old C++ class editor project. My version of the editor -- ed like commands, no regex support, menu driven -- statically compiled w/ GCC 3.4 stripped takes 403 kB (-O1) or 389 kB (-O2). (It has yet to go through a thorough review though. Anybody care to take a look?) I suppose i could/should save a copy just in case. That's pretty heavy, considering that without REs it would be roughly equivalent to the dreaded EDLIN.COM, which came in at around 7K. ;) -- Matthias Buelow; [EMAIL PROTECTED],informatik.uni-wuerzburg}.de ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How to edit file in single user mode
in message [EMAIL PROTECTED], wrote Matthias Buelow thusly... Parv wrote: ...my old C++ class editor project. My version of the editor -- ed like commands, no regex support, menu driven -- statically compiled w/ GCC 3.4 stripped takes 403 kB (-O1) or 389 kB (-O2). (It has yet to go through a thorough review though. Anybody care to take a look?) That's pretty heavy, Well there are some factors: my first attempt of the editor w/ linked list as the data structure, and C++ itself. considering that without REs it would be roughly equivalent to the dreaded EDLIN.COM, which came in at around 7K. ;) 7 kB? Dang, that's smaller than ed(1), 143 kB, itself. ed(1) seems better and better (if EDLIN.COM equivalent is unavailable for Unix). - Anubhav -- ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Remove f-q@chvlva... address (was Re: How to edit file in single user mode)
in message [EMAIL PROTECTED], wrote Parv thusly... (something) Those replying to this its child messages, please remove [EMAIL PROTECTED] address before sending your reply. I meant f-q to expand to [EMAIL PROTECTED] which obviously it did not. I apologize to the list. - Parv -- ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How to edit file in single user mode
Trey Sizemore wrote: Fernando Gleiser wrote: On Sun, 28 Nov 2004, Trey Sizemore wrote: I made a typo in rc.conf and now am able to boot only into single user mode. I thought vi would be available to edit the file, but cannot execute it (vi not found). How can I edit my rc.conf at this point/ After you drop into single user, say the magic words: # mount -a that will mount all the filesystems and then vi will be available. Fer D'ohsorry. Dumb question, but thanks for answering anyway! {Sorry to come into this so late...} Not necessarily a dumb question. What if you can't mount /usr ? then you've even more trouble. You can learn to use ed(1), but that's like going back thirty years. Not that we hate anyone who was using computers back then ... There was some discussion on the lists (IIRC) a while back on the idea of building a small editor binary that you like (trying to remember some of the possibilities: zed, ved, led, sted, (but not ted), ee (already in the base system), pico, nano, nah, can't really remember :- ) and cp'ing it to /bin in preparation for just such an emergency. With root partitions {generally} being a tad larger these days than in the elder times, it might be a feasible idea...I'm pretty sure *someone* out there has tried it. Come to think of it, I may. :-) Kevin Kinsey DaleCo, S.P. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How to edit file in single user mode
in message [EMAIL PROTECTED], wrote Kevin D. Kinsey, DaleCo, S.P. thusly... On Sun, 28 Nov 2004, Trey Sizemore wrote: I made a typo in rc.conf and now am able to boot only into single user mode. I thought vi would be available to edit the file, but cannot execute it (vi not found). What if you can't mount /usr ? then you've even more trouble. You can learn to use ed(1), but that's like going back thirty years. Key is to learn some ed before the actual need arises. Else, frustration lies the other way. There was some discussion ... on the idea of building a small editor binary that you like ... and cp'ing it to /bin in preparation Remember to link your favourite editor statically before even bother to copy. Currently, ee is linked here (4.10-p4) to ... libncurses.so.5 = /usr/lib/libncurses.so.5 (0x28073000) libc.so.4 = /usr/lib/libc.so.4 (0x280b5000) Whatever happens to the editor, it needs to be self contained/sufficient by being small, statically compiled, and be usable w/o the facility of curses. That reminds me of my old C++ class editor project. My version of the editor -- ed like commands, no regex support, menu driven -- statically compiled w/ GCC 3.4 stripped takes 403 kB (-O1) or 389 kB (-O2). (It has yet to go through a thorough review though. Anybody care to take a look?) I suppose i could/should save a copy just in case. - Parv -- ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How to edit file in single user mode
On Wed, Dec 01, 2004 at 06:03:05PM -0600, Kevin D. Kinsey, DaleCo, S.P. wrote: There was some discussion on the lists (IIRC) a while back on the idea of building a small editor binary that you like (trying to remember some of the possibilities: zed, ved, led, sted, (but not ted), ee (already in the base system), pico, nano, nah, can't really remember :- ) and cp'ing it to /bin in preparation for just such an emergency. With root partitions {generally} being a tad larger these days than in the elder times, it might be a feasible idea...I'm pretty sure *someone* out there has tried it. Come to think of it, I may. :-) On i386 platforms, I build a copy of e3vi from ports and cp it to /root/bin. It's 12.8k (!) and, as long as you don't get too fancy, it's a reasonable vi clone. Saved my bacon a few times already. -T -- If you can spend a perfectly useless afternoon in a perfectly useless manner, you have learned how to live. Lin Yu-T'ang ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
How to edit file in single user mode
I made a typo in rc.conf and now am able to boot only into single user mode. I thought vi would be available to edit the file, but cannot execute it (vi not found). How can I edit my rc.conf at this point/ Thanks a lot. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How to edit file in single user mode
On Sun, 28 Nov 2004, Trey Sizemore wrote: I made a typo in rc.conf and now am able to boot only into single user mode. I thought vi would be available to edit the file, but cannot execute it (vi not found). How can I edit my rc.conf at this point/ After you drop into single user, say the magic words: # mount -a that will mount all the filesystems and then vi will be available. Fer ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How to edit file in single user mode
Fernando Gleiser wrote: On Sun, 28 Nov 2004, Trey Sizemore wrote: I made a typo in rc.conf and now am able to boot only into single user mode. I thought vi would be available to edit the file, but cannot execute it (vi not found). How can I edit my rc.conf at this point/ After you drop into single user, say the magic words: # mount -a that will mount all the filesystems and then vi will be available. Fer D'ohsorry. Dumb question, but thanks for answering anyway! ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]