`
deepinandroid
  • 浏览: 2615 次
最近访客 更多访客>>
社区版块
存档分类
最新评论

shell safely remove USB flash disk

 
阅读更多
Linux (Ubuntu): safely remove USB flash disk via command line
http://stackoverflow.com/questions/13224509/linux-ubuntu-safely-remove-usb-flash-disk-via-command-line
You can do this using udisks. it is not installed by default but easy enough to install (the package is like a meg in size once installed)...

sudo apt-get install udisks
Once installed you can detach a USB drive with the following commands...

sudo udisks --unmount /dev/sdb1
sudo udisks --detach /dev/sdb
The first line unmounts it. Just like any other partition you can still remount it at this point. The second line detaches it. After this it is powered down and you have to remove/reinsert it to remount.

To clarify sdb is the device and sdb1/2/3/etc are partitions on the device. Also, you will need to unmount all mount points before you attempt to detach the device. Usually with a USB stick/drive there is only one but it is a warning you should know about none the less.

Getting the device name from the mount point would require you pull it from mount or something.
分享到:
评论

相关推荐

    USB Safely Remove 6.4.2.1298.zip

    USB Safely Remove Portable是一款用于毫不费力地快速断开任何可移动设备的工具。它不仅能节省时间,还能确保在拔掉设备时,所有数据都保留在设备上。Safely Remove是一个系统工具,旨在快速和安全地停止连接到您的...

    USB Safely Remove v6.1.5 USB安全删除(简体中文)+破解

    With this utility you can safely stop and remove USB Flash Drives much faster then using "Safely remove hardware"" icon in the system tray. FEATURES: *Unlimited number of processes to launch You may...

    USB Safely Remove 4.1.5.806 多国语言版

    USB Safely Remove是一个可以安全删除USB设备的系统工具. 它使用方便, 可以删除任何USB设备, 可以自动停止设备而不必将其拔出. 该软件还提供设置热键, 防止设备假死, 定制设备显示名称, 插入设备自启动程序等功能....

    USB.Safely.Remove.安全移除工具

    USB Safely Remove 是一个增强型USB移动设备安全移除工具,比Windows自带的USB设备删除工具功能更强大使用更方便,USB Safely Remove 可以以不同的名称及图标显示多个移动设备,支持自定义隐藏任意USB移动设备,更...

    USB Safely Remove 5.3.x KeyGen

    USB Safely Remove是一个可以将USB设备安全删除的辅助工具,对于频繁添加或者移除USB设备的用户非常有用,能够有效帮助您解决无法删除USB设备的困扰。USB Safely Remove加入了一个堪称“杀手级”的功能──招回装置...

    USB Safely Remove 5.2.4中文版(附注册码).rar

    如果你经常频繁使用USB设备,为了保护硬件避免出现意外情况,建议你安装一个USB安全移除工具USB Safely Remove,能够在设备停止后断开电源,开启该选项后系统会断开USB设备的电源,推荐使用外置硬盘的用户使用,...

    USB Safely Remove 5.3.x KeyGen将USB设备安全删除的辅助工具

    USB Safely Remove是一个可以将USB设备安全删除的辅助工具,对于频繁添加或者移除USB设备的用户非常有用,能够有效帮助您解决无法删除USB设备的困扰。USB Safely Remove加入了一个堪称“杀手级”的功能──招回装置...

    史上最强USB删除工具USB Safely Remove 4.2.5.879 -绿色汉化版(含注册码)

    USB Safely Remove是一个可以将USB设备安全删除的辅助工具,对于频繁添加或者移除USB设备的用户非常有用,能够有效帮助您解决无法删除USB设备的困扰。 USB Safely Remove 可以直接取代操作系统内建的「安全地移除...

    USB Safely Remove 5.x KEYmaker

    USB Safely Remove 5.x 注册机

    弹出U盘移动硬盘移除工具USB Safely Remove单文件

    有时U盘和移动硬盘无法弹出,这时候就需要这款USB Safely Remove,这里提供一个单文件的绿色版,方便的使用,随时可以调出来弹出usb设备用。

    USB.Safely.Remove.rar_USB Safely Remove_remove_usb port_usb remo

    USB safely remove for USB port.

    USB Safely Remove V4.1.5.806官方免费注册版

    USB Safely Remove是一个可以将USB设备安全删除的系统工具,能够有效帮助您解决无法删除USB设备的困扰。 USB Safely Remove是一个收费软件,网上有很多破解版,但有心的用户会发现,官方曾经举行了为期一周的免费...

    USB Safely Remove

    另外,USB Safely Remove軟體也支援自訂鍵盤快速鍵的操作模式,我們可以自行設定一個常用的快速鍵如〔Win〕+〔S〕或〔Win〕+〔Z〕...之類的,如果移除清單中只有一個USB外接裝置,當我們按一下快速鍵時,它會直接將...

    USB Safely Remove(破解版)

    USB Safely Remove v4.14版 让你轻松卸载usb硬盘

    USB Safely Remove安全删除硬件V5.3中文版.rar

    USB USB Safely Remove是一款增强的安全删除硬件软件,能完全系统自带的USB设备删除工具,实时显示当前连接的USB设备名称,可为每个设备添加停止热键。显示停止菜单中可见设备与隐藏设备。F5热键可扫描硬件改动,...

    USB_Safely_Remove

    如果USB设备经常卸载不了,请使用这个USB设备软件来管理,它功能非常强大。

    USB Safely Remove 4.6.2.1140 Final

    USB Safely Remove 4.6.2.1140 Final New:June 24,2011 08:55:46 OS:Win2000/XP/2003/Vista/Win7,32(64)bit 一个可以将USB设备安全删除的系统工具.它使用方便, 可以通过组合键停止USB设备的运行,可以删除任何USB ...

    USB Safely Remove v6.1.5.1274.zip

    USB Safely Remove可以将USB设备安全删除的系统工具。它使用方便,可以通过组合键停止USB设备的运行,可以删除任何USB设备。最大的特色是,可以自动停止USB设备而不必将它拔出。 USB Safely Remove截图

    USB安全移除(USB Safely Remove) v5.1.3.1186 中文破解版

    USB安全移除(USB Safely Remove) v5.1.3.1186 中文破解版

Global site tag (gtag.js) - Google Analytics