[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27200: sed happily modifies read-only files.
From: |
Péter |
Subject: |
bug#27200: sed happily modifies read-only files. |
Date: |
Tue, 6 Jun 2017 14:32:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 |
I find it "interesting" that you do not see this as an erroneous behaviour.
That permission bit means that "do not overwrite [nor delete] it, ask the user first". Its purpose is to give (some
degree of) protection.
Every text editor, the mv command, rm command, all ask confirmation from the user (or simply refuses to overwriting or
even modifying).
The "-f" switch which mv has, means "(this time I the user grants you:) do not ask,
assume yes for the confirmation".
(And the "-n" switch means "do not ask, assume no for the confirmation".)
Only sed is which do not ask the user..
I gave no "--force" switch to sed, and yet sed assumes as if that were given.
Counterintuitive. Breaks the rules.
Assaf Gordon:
This is not a bug - just a sligthly wrong expectation of what
'write-protected' means.
- bug#27200: sed happily modifies read-only files., Péter, 2017/06/02
- bug#27200: sed happily modifies read-only files., Assaf Gordon, 2017/06/02
- bug#27200: sed happily modifies read-only files.,
Péter <=
- bug#27200: sed happily modifies read-only files., Bob Proulx, 2017/06/06
- bug#27200: sed happily modifies read-only files., Péter, 2017/06/07
- bug#27200: sed happily modifies read-only files., Assaf Gordon, 2017/06/07
- bug#27200: sed happily modifies read-only files., Davide Brini, 2017/06/07
- bug#27200: sed happily modifies read-only files., Péter, 2017/06/08
- bug#27200: sed happily modifies read-only files., Bob Proulx, 2017/06/11