vi error - E37: No write since last change (add ! to override)

You are here : Home / LINUX Tutorials


In this linux tutorial we will learn how to solve vi error - E37: No write since last change (add ! to override).



Contents of page >
  • Producing vi error - E37: No write since last change (add ! to override) in linux >
  • What does the - vi error - E37: No write since last change (add ! to override) means ?
  • Solution 1 to- vi error - E37: No write since last change (add ! to override) - quitting vi/Vim Editor without saving the file in linux >
    • Solution 1 in detail - quitting vi/Vim Editor without saving the file >
  • Solution 2 to- vi error - E37: No write since last change (add ! to override) - quitting vi/Vim Editor with saving the file in linux  >


Producing vi error - E37: No write since last change (add ! to override) in linux >
Let’s say your file is opened and in vi/vim editor and you type ‘q’  and press Enter to exit the vi editor.
It will produce - vi error - E37: No write since last change (add ! to override)

What does the - vi error - E37: No write since last change (add ! to override) means ?
This vi error means that you are trying to exit/quit the vi editor after editing the file. It does not means that you cannot quit the editor without saving. For quitting the editor without saving ‘q’ is not enough you need to type ‘q!’  and press Enter.


Solution 1 to- vi error - E37: No write since last change (add ! to override) - quitting vi/Vim Editor without saving the file in linux >
Type ‘q!’ in place of ‘q’  and press Enter.


Solution 1 in detail - quitting vi/Vim Editor without saving the file >
STEP1 : How to quit/exit vi/Vim Editor without saving the file >

Press Esc key on keyboard

STEP2 : How to quit/exit vi/Vim Editor without saving the file >

Type ’:’ (colon)

STEP3 : How to quit/exit vi/Vim Editor without saving the file >
Type
‘q!’

STEP4 : How to quit/exit vi/Vim Editor without saving the file >
Press Enter
You will quit vi/Vim Editor without saving the file.




Solution 2 to- vi error - E37: No write since last change (add ! to override) - quitting vi/Vim Editor with saving the file in linux  >

STEP1 : How to quit/exit vi/Vim Editor - saving the file >

Then press Esc key on keyboard

STEP2 : How to quit/exit vi/Vim Editor - saving the file >

Then type ’:’ (colon)

STEP3 : How to quit/exit vi/Vim Editor - saving the file >

Type
‘wq!’


STEP4 : How to quit/exit vi/Vim Editor - saving the file >
Press Enter
You will quit vi/Vim Editor saving the file.



Summary -
In this linux tutorial we solved vi error - E37: No write since last change (add ! to override).



Having any doubt? or you liked the tutorial! Please comment in below section.
Please express your love by liking JavaMadeSoEasy.com (JMSE) on facebook, following on google+ or Twitter.


RELATED LINKS>

How to edit file in vi/Vim Editor in linux - Save and quit

bash: ./yourScriptFile.sh: Permission denied Linux solved



Labels: Linux
eEdit
Must read for you :