On 1 Dec 2008, at 18:47, Conor Mac Aoidh wrote:
> Hi,
>> This is my first time sending an ilug email. I am pretty much a
> complete
> newbe to linux. I just had a question as to using the VIM command. I
> am
> trying to use this to create a new file in a new directory. It keeps
> returning the error "E212: Can't open file for writing" and after
> googleing
> the error it turns out that I do not have enough privilages to do
> what I
> want to do. I am logged in as root. Does anyone know how I can get the
> privileges that I need? Or can anyone recommend another method of
> achieving
> what I want do do - as i'm not sure if VIM should even be used for
> this
> purpose!
>> Thanks
>> --
> Conor
>Hi Conor
I suspect you may need to use the SUDO command or SU to root as the
file you
are editing might belong to the super user....root
Try this
sudo vim /path/to/the/file
or
su root
vim /path/to/the/file
You will be asked for your root password. When your finished editing
the file
save it and quit vim and then type
exit
to return to your user shell.
VIM is a tough program to get into but nearly all linux distros has it
installed.
So if you learn it you can edit files on most systems, very handy!
But if you
will only be looking after your computer then maybe something like
nano would
be better suited to your needs!
I hope this helps you.
Tom
ps enjoy reinstalling your system......
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!