When editing a file with vi or vim, how can you exit without saving?
:q! quits vi or vim while forcing the editor to discard any unsaved modifications.
:q!
Community Discussion