AW: Sync files not folders non recursively

Ehlers, Kolja ehlers at clinresearch.com
Wed Mar 4 14:21:52 GMT 2009


For clarification:

I want to sync *.htm and *.html between SOURCE AND DESTINATION. *.htm and
*.html which are not present in DESTINATION to be copied and *.htm and
*.html which are not present in SOURCE to be deleted in DESTINATION.

I dont want rsync to touch any other files.

-----Ursprüngliche Nachricht-----
Von: Ehlers, Kolja [mailto:ehlers at clinresearch.com]
Gesendet: Mittwoch, 4. März 2009 15:13
An: rsync at lists.samba.org
Betreff: Sync files not folders non recursively


Hi all,

I am now trying to find a solution to my problem for quite some time. I hope
you can help. What I am trying to do is to simply sync files with a special
suffix to a destination folder. So I dont want to transfer recursively but I
want to delete files from the destination which are not in the source
anymore.

Closest I have gotten is using this command:

/usr/bin/rsync -dnolptgvze --delete --delete-excluded --include='*.htm' --in
clude='*.html' --exclude='*' /SOURCE/ /DESTINATION/

BUT this deletes Files from folder /DESTINATION/A which are not present in
the Source. I dont want this to happen. Also it syncs folders to DESTINATION
but I only want to sync files not folders.

/usr/bin/rsync -dnolptgvze --delete --delete-excluded --include='*.htm' --in
clude='*.html' --exclude='*' /SOURCE/* /DESTINATION/

This command does not delete Files from folder /DESTINATION/A but in this
care --delete is not working - files which are not in the source anymore are
not deleted from destination.

Thanks for helping

regards

Kolja


Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.



More information about the rsync mailing list