Re: Opposite of cp -u

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



On Mon, 2007-08-06 at 17:40 -0400, Robert Moskowitz wrote:
> I had at one point copied a large number of files between drives and did 
> not use the -p and thus the timestamps were all set to the date of the copy.
> 
> I did not catch this, and deleted the source.  So I 'lived' with it and 
> have since changed many files.
> 
> Well, yesterday I found a good backup of many of those files and I want 
> to restore them to their proper dates.
> 
> cp -p -u is exactly the opposite of what I want.  I want to copy only if 
> the source files have an earlier date than the destination files.

I suggest "man find" and focus on the (new to me) versions of "newer". I
think, IIUC, that one of those tests will meet your needs. When the test
passes, an appropriate "exec ..." may do what you want.
> 
> The source files are just an old copy on another drive that I found when 
> cleaning up things...
> <snip>

HTH
--
Bill

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux