Re: Copy files of the same name - keep newest one

From: Green, Simon (Simon.Green@EU.ALTRIA.COM)
Date: Fri Mar 28 2003 - 11:28:30 EST


I believe that will overwrite existing files.

If there aren't too many, you might use the "-i" flag, which will prompt you
before overwriting a file.

Simon Green
Altria ITSC Europe s.a.r.l.

AIX-L Archive at http://marc.theaimsgroup.com/?l=aix-l&r=1&w=2
AIX FAQ at http://www.faqs.org/faqs/aix-faq/

N.B. Unsolicited email from vendors will seldom be appreciated.

> -----Original Message-----
> From: Theresa Sarver [mailto:tsarver.IFMC@SDPS.ORG]
> Sent: 28 March 2003 15:54
> To: aix-l@Princeton.EDU
> Subject: Copy files of the same name - keep newest one
>
>
> Hi all;
>
> I migrated the contents of one server's /home filesystem to
> another server several weeks ago. Now I need to go back
> through and copy any files that were created/modified on this
> old server - onto the new server, without
> affecting/overwriting the existing files on this new server.
> So basically I need to compare time stamps of the files on
> the old/new servers before the file is copied.
>
> Does anyone know, if I use "cp -Rhp", will it overwrite the
> pre-existing files? Or will it compare timestamps before copying?
>
> Does anyone know of a better method for accomplishing this task?



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:42 EDT