How to eject a drive automatically after pen drive is plugged in?
You just have change the UNIX executable file.Modify it like  rsync -aH source destination &amp;&amp; diskutil eject /Volumes/BACKUP &gt;&gt; desktop/log.txt