can rsync delete only one file in one command? is it a bug?

Huang, YongHui yhhuang at telenav.cn
Tue Mar 28 01:39:07 GMT 2006


I want to call rsync from java webserver in Linux.
 
situation as below:
 
source directory:
001.doc
002.doc
/D01/001.doc
/D01/002.doc
/D01/D11/001.doc
/D02/001.doc
 
 
destination directory:
001.doc
003.doc
004.doc
/D01/001.doc
/D01/003.doc
/D01/004.doc
/D01/D11/003.doc
/D02/003.doc
 
now, I want to only delete /003.doc when synchronization, no add, no update, This exclude works:
rsync -avzu --delete --include="/003.doc" --exclude="*" /home/tomcat/webapps/filesync/synsrc2/ 172.16.100.19::hyhtest2
 
But, If I want to only delete /D01/003.doc when synchronization, no add, no update, this exclude NOT works:
 
rsync -avzu --delete --include="/D01/003.doc" --exclude="*" /home/tomcat/webapps/filesync/synsrc2/ 172.16.100.19::hyhtest2
 
nothing was delete or add,update.
why it NOT delte /D01/003.doc? is it a bug?
 
how to delete any specify file in any directory and mean while no add or update?
 
thank you.
 
 
 
 
 
 
Best Regards
---------------------------------------------
yhhuang »ÆÓ»Ô
Server Dept.
TeleNav Shanghai Inc.
Tel:(21)6337 2220 ext 8651
www.telenav.com <http://www.telenav.com/> 
www.telenav.cn <http://www.telenav.cn/> 
 
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the rsync mailing list