linux安全移除U盘 / safely remove USB/eSATA/etc. storage devices.

1
2
3
4
5
6
7
8
9
10
11
# flush cached data 
sync

# watch the progress with:
watch grep -e Dirty: -e Writeback: /proc/meminfo

# 最后 umount
umount /dev/sdxx

# 还可以 eject
eject /dev/sdx