Hi, why i m not able to edit file in vim …i am able to write data but not able to save and exit ??
Not sure about your specific case, but usually ownership and/or permissions are the first culprit. Otherwise, the file could be immutable (chattr/lsattr), or the filesystem could be mounted readonly either by root, hardware mechanism, or detected filesystem error. vim might also be configured with ‘set ro’ on the system. The file could also have been deleted while you were editing.
Best to either move the file to where you can edit it, or try a different editor (sed, ed).
thanks man