rsync with delete option

During your RHCE Training you must have learned the benefits of rsync over scp.

Lets take one more practical scenario while doing sync with a remote server using our friend “rsync”.

There might be a situation that you need to delete any file on the target location if the same file is no more on source. That means that we don’t need that file to be sync.

We can use rysnc with –delete option for this task. Using rsync with –delete will delete any file on the target, if the same is not available on the source.

Here is a illustrated screenshot for the whole task, from my desktop.

(PS: it takes me more time to do photo editing than to show the whole task.)

View the same post and more updates on Network NUTS Facebook Page.

rsync with --delete option

rsync with –delete option

Advertisements