coreutils
[Top][All Lists]
Advanced

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

Re: cp and --backup error


From: Jim Meyering
Subject: Re: cp and --backup error
Date: Fri, 16 Jun 2017 06:53:07 -0700

On Fri, Jun 16, 2017 at 3:11 AM, slash mais <address@hidden> wrote:
> The command:
>         cp -r -P --preserve=all --strip-trailing-slashes --backup=numbered
> "/source-dir/source-file" "/source-dir/"
> returns:
>         cp: ‘/source-dir/source-file’ and ‘/source-dir/source-file’ are the 
> same file
>
> This result is wrong because '--backup' has been specified, and 'cp'
> should do the backup and copy actions regardless in this case.

If you really want to do that, you must also specify the -f (--force) option.



reply via email to

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