Home rsync: Sync all files to single directory, ignoring directory structure
Reply: 0

rsync: Sync all files to single directory, ignoring directory structure

user720
1#
user720 Published in June 23, 2018, 4:23 am

I would like to sync all files to a certain directory without syncing the directory structure.

So far, I have this:

rsync -vcr --remove-source-files --exclude='*sample*' --exclude='*Sample*' --include='*/' --include='*.avi' --include='*.mkv' --include='*.mp4' --include='*.wmv' --exclude='*' $src1 $src2 $dest

That seems to be working fairly well, but if one of the included file types are in a sub-directory of the source directories, the parent directories will also be transferred.

To sum it up, I want all included file types to be moved straight to the single destination directory, WITHOUT copying the parent directory structure.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.320501 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO