saving and exiting: changes made in root (VIM

Discussion in 'Server Operation' started by expunkermikey, Aug 7, 2008.

  1. expunkermikey

    expunkermikey New Member

    Hello all,

    I am about as new to terminal as they come.
    I am following a tutorial called "The Perfect Server" written by "falko".

    It was suggested that i use "VIM" to edit as the tutorial goes along.

    The question is, How do i save, and or exit this editor when the changes are complete? "F1" gets me to the "help" texts, but I can't find the related information in that file.

    Please help a really new newbe from a "terminal" illness and keep me from going back to a GUI. I realy like doing things this way, It kinda' helps me shed the Microsoft smell....

    Mikey
     
  2. topdog

    topdog Active Member

  3. expunkermikey

    expunkermikey New Member

    one more thing...

    Thanx for that!

    On my way now... But one more thing if you don't mind.

    It was suggested by this OS to delete or rename the swap file that is currently holding the changes made.

    The original "fstab" File has reverted back to default. With your previous answer, I will be able to edit this file and save it there. But according to the system, I must rename or delete the .swp to avoid a conflict.

    I understand why, but how to go about it?

    Thanx again.

    Mikey
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Can you post the output of
    Code:
    ls -la /etc
    so that I know the exact name of the .swp file?

    Deleteing a file works as follows:
    Code:
    rm -f /path/to/file
     
  5. expunkermikey

    expunkermikey New Member

    Thank you falko...

    When I ran: vi /etc/fstab again, the ubuntu server os directed me to a warning text about the swp. file of the same nameast he one I had screwed up. The text gave me several options including the option to delete this duplicate. I chose the delete option and then returned to root.

    The output you requested did not produce a file name. You might have guessed that /etc/fstab.swp is the file in question.

    I went back and re-edited the files in previous parts of the tutorial, and saved them properly this time.

    All seems well now and I am continuing the tutorial. Thank you for your help in this, and thank you to all others who have posted reponses with my other questions.

    "Moving right along..."

    Mikey :)
     

Share This Page