Mailinglist Archive: opensuse (2859 mails)

< Previous Next >
Re: [opensuse] the cp command
  • From: chika@xxxxxxxxxxxx
  • Date: Fri, 4 May 2007 11:36:29 +0700 (WIT)
  • Message-id: <3584.10.126.12.24.1178253389.squirrel@xxxxxxxxxxxxxxxxxxxx>

cp -u sourceFile targetFile

u can update only the latest file
see man cp first (it also work for other command) :D

for more strict u can "set -o noclobber" on cli if u don't wanna overwrite
the existing file with older o newest file

for more info
http://www.cyberciti.biz/tips/howto-keep-file-safe-from-overwriting.html


always happy being "baka" person.... so i can learn much more
cheers,

chika


> Hello,
>
> I have two directories that are almost identical to each other and I need
> to
> copy the contents of the source directory over the to the target
> directory,
> but without overwriting any files that are newer on the target. Is there
> an
> argument that I can use with the 'cp' command to accomplish this?
>
> I have the following to preserve time stamps and permissions; cp -pRv
> /mnt/userdir /media/userdir
>
> Thank you,
>
> James
> --
> To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
> For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
>
>


-- 
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References