2015. április 8.

Command Line alternative to Safely Remove Drive

Recently my external USB drives (HDD, Pendrive, Kindle, mobile phone) stopped detaching itself after unmount.
Obviously I would not plug out a HDD with 750GB data that is still spinning. But it does not want to stop at all. I can mount and umount it and it is still spinning. (Or whatever these new drives does instead of spinning)

So the solution is to do the command line equivalent of safely remove in two steps:
1. unmount
2. detach

The solution I found on askubuntu:

For a practical example, if I have the partition /dev/sdb1 mounted, I would run this to unmount and detach it:
udisks --unmount /dev/sdb1
udisks --detach /dev/sdb

Nincsenek megjegyzések: