cp(1) -n option for rsync?

Sander van Zoest sander at yahoo-inc.com
Fri Dec 6 19:54:00 EST 2002


Hi,

I looked in the archives and documentation and didn't notice anything
of this. The closest thing I found was -update, but that doesn't do
exactly to what I would like.

I would like to be able to use rsync to mirror some directories, but
to explicitly *not* override any files that already exist on the other
side. Sort of like a file system "append", if you will.

The cp(1) command on FreeBSD has the option -n:
    -n    Do not overwrite an existing file.  (The -n option overrides any
           previous -f or -i options.)

I was wondering if I could somehow accomplish this doing an rsync between
two machines?

I'd like to avoid to have to do an test -e over ssh to see the file exists
before copying the file accross.

Any info would be appreciated.

Thanks,

-- 
Sander van Zoest                                          +1 (619) 881-3000
Yahoo!, Inc.                                           sander at yahoo-inc.com
<http://www.yahoo.com/>                       <http://sander.vanzoest.com/>



More information about the rsync mailing list