I use rsync v. 3.0.4 and when I need to move something I use it with the --remove-source-files. I prefer rsync than mv.
Unfortunately, when I use --remove-source-files, the directories are left on the source side (as said in the man). Is there a way to remove directories too once moved all the files?
You could always delete them manually with something like this:
This will only delete empty directories.
You might be able to get
rsync
to write a log file in a format that your script could parse for the names of the directories to delete. Seeman rsyncd.conf
for the available log format escapes.Can't you just "rm -rf" them?