Immutable attribute is a problem for editors
I want to be able to make a file write protected so I do not accidentally write over it.
So I set the immutable attribute. Unfortunately no editor will let me save it under a different name. Any workaround ? I am using Linux Puppy which is root by default. |
This is a shot in the dark, as I've never mucked about with the immutable attribute: Copy the contents of the file to the clipboard, open a new file in an editor, paste the contents into it, then save that file.
Alternatively, unset the immutable attribute: http://www.aboutlinux.info/2005/11/m...hich-even.html, then make a copy of the file. |
Which editor(s) are giving you a problem? I just tried that with gedit, vim, and emacs, and none of them had any problem with writing to a different name.
Do you perhaps not have write permission in the directory? |
Quote:
It is quite handy as even root users can not edit or delete it. :-) Even the "all powerful" rm cannot touch it without first removing the attribute. Your method is a clunky workaround at best. No offense. |
Quote:
Slacko Puppy has root access by default. |
I tried geany in tahrpup-6.0.5 and had no problem reading an immutable file and writing it to a new name. I can't get Slacko Puppy 6.3.0 to run well enough in a VM to test anything (major issues with X-windows and mouse tracking).
Did you make the directory immutable too? That would prevent creating a new file there. |
Geany does work by saving to a different file name.
|
All times are GMT -5. The time now is 07:28 PM. |