Koozali.org: home of the SME Server

Save files via ' vi ' and telnet

Mike Niedzwiedz

Save files via ' vi ' and telnet
« on: March 16, 2001, 07:20:15 PM »
Hello i am trying to edit  config.php  useing the vi command via telnet, can someone tell me how to save the file after modifying it???  thanks  im learning..

Rob thomson

Re: Save files via ' vi ' and telnet
« Reply #1 on: March 16, 2001, 10:45:11 PM »
Try this,

After you've made your modifications

press [escape] to go to command mode
then  ":x"  followed by Return

That should save and exit vi.

Regards
Rob

Charlie Brady

Re: Save files via ' vi ' and telnet
« Reply #2 on: March 16, 2001, 11:10:05 PM »
Mike Niedzwiedz wrote:

> Hello i am trying to edit  config.php  useing the vi command
> via telnet

Try using "pico" instead. There's a nice little "cheat sheet" down the bottom of the screen.

Charlie

david

Re: Save files via ' vi ' and telnet
« Reply #3 on: March 19, 2001, 06:08:32 AM »
in vi

esc to exit insert mode
:w to write changes
:q to exit
:q! to exit and discard changes