rsync : Recursively sync all files while ignoring the directory structure

后端 未结 4 2115
春和景丽
春和景丽 2021-02-12 19:05

I am trying to create a bash script for syncing music from my desktop to a mobile device. The desktop is the source.

Is there a way to make rsync recursively sync files

4条回答
  •  忘了有多久
    2021-02-12 19:31

    May be this is a recent option, but I see the option --no-relative mentioned in the documentation for --files-from and it worked great.

    find SourceDir -name \*.mp3 | rsync -av --files-from - --no-relative . DestinationDir/
    

提交回复
热议问题