1

I was able to access rc.local just a little bit ago and now it wont let me. I cant even delete the swp file due to permission issues. Im not sure where to go from here, the error i get when opening the rc.local file is

Error reading lock file /etc/.rc.local.swp: Not enough data read.

When i try to delete the swp file i get

rm /etc/.rc.local.swp

rm: remove write-protected regular empty file '/etc/.rc.local.swp'? y

rm: cannot remove '/etc/.rc.local.swp': Permission denied

  • just fixed the problem, had to use sudo to remove .rc.local.swp //it is a real file – Reese Houseknecht Apr 8 '19 at 23:59
3

.*.swp files are created by the vi editor to log changes so that the undo command can work.

They are created with the same permissions as the file they are logging in the same directory. Because the name starts with a period they are hidden.

If you've used sudo vi /etc/rc.local and created /etc/.rc.local.swp you'll need to use sudo rm /etc/.rc.local.swp to remove it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.