Friday, August 27, 2010

Re: History doesn't work !

Птн, 27 Авг 2010, member thudfoo писал(а):
> On Fri, Aug 27, 2010 at 3:58 PM, Simon Ruderich <simon@ruderich.org> wrote:
> > On Fri, Aug 27, 2010 at 02:17:34PM -0700, Tintin72 wrote:
> >>>Did you use sudo vim instead of sudo -e ?
> >>
> >> Yes I did. I don't know sudo -e. What it's about ?
> >
> > man sudo will tell you. It runs the editor as a normal user on a
> > temporary file. Then sudo writes the content to the real file.
> >
> > It should be used instead of just plain sudo to prevent running
> > the editor as root.
> >
>
> I read "man sudo" but I do not understand what it is saying.

Eg. to edit the file /etc/hosts, type
sudo -e /etc/hosts
assuming $EDITOR or $VISUAL has been set, if not, add the line to your
.profile or .bashrc and logout and login again
export EDITOR=vi (or vim if your prefer)

-
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment