coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH 3/4] copy: make backup files more reliably


From: Kamil Dudka
Subject: Re: [PATCH 3/4] copy: make backup files more reliably
Date: Mon, 31 Jul 2017 10:46:34 +0200
User-agent: KMail/4.14.10 (Linux/4.9.34-gentoo; KDE/4.14.32; x86_64; ; )

On Sunday, July 30, 2017 17:19:06 Paul Eggert wrote:
> +  cp, install, ln, and mv now use a numbered instead of a simple
> +  backup if copying a backup file to what might be its original.
> +  E.g., 'rm -f a a~; : > a; echo data > a~; cp --backup=simple a~ ./a'
> +  now makes a numbered backup file instead of losing the data.

I do not think that this behavior is expected at all.  If the user
explicitly asks for a simple backup, cp should either make a single
backup or fail honestly if the simple backup cannot be made.  That
is how --backup=simple has always been documented (and it is still
documented such in the cp(1) man page):

      simple, never
              always make simple backups

Kamil



reply via email to

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