[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69532: mv's new -x option should be made orthogonal to -t/-T/default
From: |
Paul Eggert |
Subject: |
bug#69532: mv's new -x option should be made orthogonal to -t/-T/default |
Date: |
Mon, 4 Mar 2024 20:10:35 -0800 |
User-agent: |
Mozilla Thunderbird |
On 3/4/24 16:43, Dominique Martinet wrote:
Adding Rob to the loop because this impacts compatibility with
toybox/maybe busybox implementations
Busybox does not use RENAME_EXCHANGE, so this isn't a Busybox issue.
Toybox mv added -x to its development version yesterday:
https://github.com/landley/toybox/commit/a2419ad52d489bf1a84a9f3aa73afb351642c765
so there's little prior art there, and there's still plenty of time to
fix its problems before exposing it to the world.
I also see --swap mostly used by scripts and this actually feels a bit
dangerous to me -- I'd *always* use this with -T.
Yes, it's a problem.
By "see --swap mostly used by scripts" I assume you mean scripts that
haven't been written yet, assuming that nobody had -x until yesterday....
(by the way, what's this "rename" command you speak of?
https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/
Now that I've looked into it further, util-linux already has an "exch"
command that does exactly what you want. This is the command that toybox
should implement rather than try to simulate it with "mv -x" (which
causes all sorts of problems).
That is, toybox should revert yesterday's change to "mv", and should
implement "exch" instead.
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Paul Eggert, 2024/03/03
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Pádraig Brady, 2024/03/04
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Dominique Martinet, 2024/03/05
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default,
Paul Eggert <=
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Dominique Martinet, 2024/03/05
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Pádraig Brady, 2024/03/05
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Karel Zak, 2024/03/05
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Masatake YAMATO, 2024/03/05
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Paul Eggert, 2024/03/17
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Pádraig Brady, 2024/03/17
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Pádraig Brady, 2024/03/17
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Paul Eggert, 2024/03/20
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Bernhard Voelker, 2024/03/20
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Paul Eggert, 2024/03/20