Contents
means run a shell command, and % is the current filename. You can also just force the file write: :w! If the file is read only, you have only to enter : w ! ! , you will be prompted for your password and then the file will be successfully written to.
How do you exit a read only file in Linux?
Press the [Esc] key and type Shift + Z Z to save and exit or type Shift+ Z Q to exit without saving the changes made to the file.
How do I change a read only file in Linux?
How to edit a read only file in Linux ?
- Log on to a root user from the command line. type the command su.
- Enter the root password.
- Type gedit (to open a text editor) followed by the path of your file.
- Save and Close the file.
12 февр. 2010 г.