Sample Header Ad - 728x90

Linux: how to ensure it's possible to remove USB stick from commandline?

1 vote
0 answers
153 views
When working from command line I usually use an USB mass storage device with customary: sudo mount /dev/sde1 /mnt -o rw,umask=0000 ... use it... sudo umount /mnt This works fine *IF* you let the stick in its slot a few seconds AFTER umount has terminated (and shell prompt is back). Having a stick equipped with activity LED I can clearly see there's activity for a sizable amount of time AFTER umount (there's ample time to reach for the stick and yank it away AFTER prompt returns, but BEFORE it goes quiet). Waiting for activity to terminate ensures filesystem on stick is not corrupted. I suspect Device driver is still working. Question is: Which command (if any) could ensure device can be removed as soon as prompt returns? Note: eject does not work (for this).
Asked by ZioByte (910 rep)
Sep 15, 2019, 02:57 PM