Stan on Mon Mar 15 2004 - 14:57:07 CET wrote:
I am logged in as root,
I want to use vi to edit a text file, but after I make my corrections, I :w to write the changes but I get the subject error.
I checked the permissions for the file using ls-l and added privileges to all ( with a chmod, 777 )
I tried the vi again, still get the error:
Error 21 cannot make changes 'modifiable' is off
Any suggestion on what to do next ?
Stan
Stan, check: vi --help, (or vim --h, if you use Vi Improved). when I exit I usually (after I do escape) use: ":wq <CR>" (without the quotes, if I do want to save the changes) or " :q <CR>" (without the quotes, if I don't want to save the changes) My handy dandy vi References says you can also do: " :w <filename> <CR>" if you want to write to file <filename> without exiting from vi but have I never used that command. Don't know if vi supports it. but you might want to try. Hope this helps, Gar -- In the Beginning was the Command Line ---Neal Stephenson -- __________________________________________________________________ Introducing the New Netscape Internet Service. Only $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp