[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths
From: |
Rob Landley |
Subject: |
Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths |
Date: |
Fri, 1 Mar 2024 19:34:37 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 |
On 3/1/24 03:18, Pádraig Brady wrote:
> On 29/02/2024 22:02, Petr Malat wrote:
>> renameat2() syscall allows atomically swapping 2 paths on one
>> file system. Expose this ability to the user using -s option.
>>
>> * NEWS: Mention the new option
>
> Thanks for the patch.
>
> That was suggested previously:
> https://lists.gnu.org/archive/html/coreutils/2021-05/msg00030.html
>
> I agree this is useful functionality,
> but the thinking is we should add this to a "replace" utility
> rather than to mv.
I added it as "mv -x" (exchange) in toybox:
https://mstdn.jp/@landley/111920584191115050
I'd have mentioned it here, but:
https://lists.gnu.org/archive/html/coreutils/2023-08/msg00100.html
Rob
- Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths, Pádraig Brady, 2024/03/01
- Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths, Petr Malat, 2024/03/01
- Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths, Rob Landley, 2024/03/01
- Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths, Pádraig Brady, 2024/03/02
- Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths, Dominique Martinet, 2024/03/02
- Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths, Pádraig Brady, 2024/03/02
- Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths, Petr Malat, 2024/03/02
- Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths, Pádraig Brady, 2024/03/03
- Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths, Rob Landley, 2024/03/02
- Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths, Petr Malat, 2024/03/02
Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths,
Rob Landley <=
Re: [PATCH] mv: add --swap (-s) option to atomically swap 2 paths, Kaz Kylheku, 2024/03/01