coreutils
[Top][All Lists]
Advanced

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

Unexpected results between cp -u and cp -ru


From: Leslie S Satenstein
Subject: Unexpected results between cp -u and cp -ru
Date: Sat, 22 Aug 2020 12:11:36 +0000 (UTC)

Introduction===========
/share2 is a backup of /share  (each has many subdirectories)

cp -u /share/* /share2

operates as described with man docs.   The cp -u  command only copies over 
newer files or when no file exists within /share2 

Issue=====
The intent is to only update newer files within each sub-directory of /share 
and /share2. 

But ... by trying to do a recursive descent with   cp -ru /share     /share2    
            
I am prompted to  "confirm" overwrite for every source file that is newer than 
the target file?  

Is it normal behaviour?   Does using the -r option negate the -u option?  

I am trying to do limited backup copies from /share to /share2    and only want 
to copy newer or missing files /dirs.
I tried with rsync with the checksum option. Execution to do the cp -ru 
equivalent takes excessive amounts of time.

Should the -r negate the -u function option?

Regards 
 Leslie
 Leslie Satenstein
 

 

reply via email to

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