Skip to content

Instantly share code, notes, and snippets.

@david-martin
Created October 24, 2017 12:01
Show Gist options
  • Save david-martin/9644a0656602d846fc0007be28352d34 to your computer and use it in GitHub Desktop.
Save david-martin/9644a0656602d846fc0007be28352d34 to your computer and use it in GitHub Desktop.
Unmount all volumes that have a mount path that contains the current directory
mcpclean_umount() {
for i in $(df -a | grep $PWD | awk 'NF>1{print $NF}'); do
sudo umount $i;
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment