reverse delete?

tim.conway at philips.com tim.conway at philips.com
Thu Jan 3 05:41:22 EST 2002


#!/bin/sh

for file in `rsh remote 'cd ~/Maildir;find . -type f -print'`
do
[ -f "~/Maildir/$file" ] && rm ~/Maildir/$file
done

Tim Conway
tim.conway at philips.com
303.682.4917
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, n9hmg on AIM
perl -e 'print pack(nnnnnnnnnnnn, 
19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), 
".\n" '
"There are some who call me.... Tim?"




Graham Guttocks <graham_guttocks at yahoo.co.nz>
Sent by: rsync-admin at lists.samba.org
01/01/2002 01:57 PM

 
        To:     rsync at lists.samba.org
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        reverse delete?
        Classification: 



Greetings,

I'm looking for an option that deletes from the receiving side
any files contained on the sending side.  For example,

If local:~/Maildir/ contains:

123.txt
456.txt

And remote:~/Maildir/ contains:

123.txt
456.txt
789.txt

Running rsync local:~/Maildir/ remote:~/Maildir/ with the appropriate
options would leave remote:~/Maildir/ with:

789.txt

and local:~/Maildir/ would remain unchanged with:

123.txt
456.txt

Regards,
Graham


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com








More information about the rsync mailing list