How Do I Override a Read Only File in Linux?
Contents to Save a File That’s Read-Only, Use the Following Command: :Wq! the Exclamation Point After Write-Quit Is to Override the Read-Only Status of the...
Contents
To save a file that’s read-only, use the following command: :wq! The exclamation point after write-quit is to override the read-only status of the file.
How do I overwrite a read only file in Linux?
The first way assumes you own the file, but the file is READONLY. Just use vi’s exclamation mark suffix to the write command (:w!) to force overwriting your own READONLY file. This of course assumes that you have permission to write and execute in the current folder.
Must Read
How do I edit a read only file in Linux VI?
How to open a file in readonly mode:
- Use view command within vim. The syntax is: view {file-name}
- Use vim/vi command line option. The syntax is: vim -R {file-name}
- Modifications not allowed using command line option: The syntax is: vim -M {file-name}
29 июн. 2017 г.