Hi All, I am trying to rsync contents of a directory while making sure that "only" files under that directory are synched and "not" the contents of any sub-directory under that dir. I know that I will have to use the include/exclude option but not sure how. Can some please help? Thanks -- View this message in context: http://www.nabble.com/using-rsync-to-transfer-only-files-and-not-sub-directories-tp19518813p19518813.html Sent from the Samba - rsync mailing list archive at Nabble.com. -------------- next part -------------- HTML attachment scrubbed and removed
Matt McCutchen
2008-Sep-17 00:19 UTC
using rsync to transfer only files and not sub-directories
On Tue, 2008-09-16 at 12:30 -0700, Meeaz wrote:> I am trying to rsync contents of a directory while making sure that > "only" files under that directory are synched and "not" the contents > of any sub-directory under that dir. I know that I will have to use > the include/exclude option but not sure how.The following will copy the subdirectories themselves but not their contents: rsync -d SRC/ DEST/ If you don't want the subdirectories at all, do this: rsync -d --exclude='*/' SRC/ DEST/ Matt