[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warn when editing read-only files

From: Dan Jacobson
Subject: Re: Warn when editing read-only files
Date: Fri, 17 Nov 2023 16:17:08 +0800

>>>>> "PJ" == Paul Jackson <pj@usa.net> writes:
PJ> might have intended only to read a file, not write it

OK, no warning then upon opening a read only file. Fine.

But ah ha, how about a warning upon using a "a" or "i" etc.

Nobody uses those unless they certainly intend to write later,
so it would be wise to warn early that they are headed for trouble.

Yes, they could "w /tmp/some_rescue_file", upon finding even their whole
home disk mounted read-only. But they perhaps have to leave the facility
and poweroff soon, so /tmp would be going away...

And if they were so smart, they would first do "w somewhere_else" before
their "a" or "i" commands... but then there's "c" etc. Hmmm, s too...

So that's why I wanted the warning upon opening the read-only file,
even before one starts thinking of how they want to change the file.

And ed is an EDitor, for just browsing you should be using "more" or "less."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]