How to exit VI with or without saving
Although many alternatives exist, I like using vi for all my command line editing needs. To save changes, I usually use SHIFT + Z + Z, exiting vi under most circumstances. But sometimes, this trick doesn’t work because of write permission problems. In such cases, vi doesn’t close with the above command. Instead, we must … Read more