Created
February 19, 2019 10:10
-
-
Save assafmo/4a876d74591abcca527572ee022a7241 to your computer and use it in GitHub Desktop.
Safely unmount disk on ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DEV=$(mount | grep /media/ | awk '{print $1}') | |
udisksctl unmount -b "$DEV" | |
udisksctl power-off -b "$DEV" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment