Is there any rsync command that can remove some remote directory from rsync share completely? I mean delete not only directory content but the directory itself. And without rsyncing the entire parent directory since it can be very large.
How to remove directory from rsync share completely
linux;rsync
Answering my own question...In fact it is possible to remove directory from the remote server completely (including directory itself). Check the example below:rsync -r --delete --include 'x/***' --exclude '*' local_empty_directory/ rsync://some_server/some_share/x_parent_directoryThe key is to clean the parent directory for x (x_parent_directory in example) using local empty directory local_empty_directory while excluding everything by using --exclude '*' and including only the directory we want to delete (x in example) and its content by --include 'x/***'.