[Top][All Lists]

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

bug#32069: Man page description is wrong for -i

From: Assaf Gordon
Subject: bug#32069: Man page description is wrong for -i
Date: Fri, 6 Jul 2018 15:43:01 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0


On 06/07/18 02:54 PM, Matthew Jenkins wrote:
I'm not asking to change the behavior of sed. I'm asking to have the
man page reflect what sed -i actually does to at least be less wrong
so it's less of a gotcha.

Examples of gotchas:
sed -i on a large file when you only have less than that amount of
space available.
sed -i on a hard link

when out of disk space, 'sed -i' behaves in a very reasonable and safe way:
it will fail to create the temporary file, and leave the original file unmodified.

As for 'sed -i' on hard-link:
"sed -i" has never maintained hard-links with "--in-place",
and neither does any other common unix utility - so it is not clear
where this expectation originates from.

I'm sure there are more but these gotchas wouldn't be gotchas anymore
with a better description.

"sed -i" certainly has some gotchas, and few are documented in the manual:

It seems the "in-place" related topics are growing, perhaps it is
warranted to dedicated a separate section in the manual.

If you'd like to try and add such a section - please do send a patch.

Otherwise, I will try to add something like that at a later time.

 - assaf

reply via email to

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