[CentOS] Need to do some careful moving...

Alfred von Campe alfred at von-campe.com
Wed Jun 27 01:32:44 UTC 2007

On Jun 26, 2007, at 21:03, Robert Moskowitz wrote:

> When I built this new Centos 5 drive, I copied over much of my old  
> data using cp, and did not use the -preserve option.  Ouch.  I need  
> those file create dates so that documents and such sort properly,  
> historically.
> I recovered much of my stuff from a tar built back in mid-May (but  
> I missed that the tar backup ended abnormally, as I was tar-ing to  
> a USB attached drive formatted FAT32, and at 4Gb, it stopped).
> Now I want to copy all of my newer files into this recovered  
> directory.  The -u option of cp and mv will do the wrong thing, of  
> course.  I want to only copy files that are NOT present in the  
> recovered directory.  I will of course still be stuck with a lot of  
> files with a Jun 18 date that were created between the backup date  
> and Jun 18, but at least I will be better off....

Sounds like the perfect job for rsync.  You probably want to use the - 
a option.  Check out the man page and test on a different directory  
until you get the directory hierarchy just right.


More information about the CentOS mailing list