|
CentOS Linux Server Guide |
Vi Editor - Save and Quit |
|||||
|
There are 2 way you can save the content after you finished editing a file.
Method 1: issuing :w to save current file contentTo save the current content under the name of the file that you currently open. However, please make sure that you are in command mode of vi
Method 2: issuing :w filename to save current file content as different file nameIf you wish to save the file under different file name, you can issue the :w filename
Method 3: issuing :wq to save current file content and quit the vi applicationThe following command let you save the current open file content and quit the application after save operation.
If you merely open the file content and do not make any changes to the open file, you can issue the following command
You can also issue the following command to force quitting without saving.
|
|||||
|
Copyright 2011 http://www.1a-centosserver.com All Rights Reserved All trademarks are the property of their respective owners. Contact Us | Terms of Use | Privacy Policy |