On 2024-09-02 at 12:51, Lee wrote: > On Mon, Sep 2, 2024 at 5:25 AM Thomas Schmitt wrote: > >> Hi, >> >> Lee wrote: >> >>> Oops.. I wrote to the stick using the Cygwin cp on an >>> MS-Windows machine, so I'm guessing the damage was done even >>> before ejecting the stick. >> >> MS-Windows can eject a stick ? >> xorriso silently fails to do so: >> >> xorriso -outdev stdio:/dev/sdc -eject out >> >> (Sorry i could not refrain from this nonsense :)) > > but it isn't nonsense. Welcome to the world of Windowz, where one > 'ejects' a USB stick and then gets a pop-up saying something about > safe to remove the hardware now. > > Maybe there's a command to unmount / sync / whatever a USB stick but > I've always used Windows Explorer and the only option for what to do > before unplugging a USB stick is to eject it.
My understanding is that when you tell Windows to "eject" removable media, it does whatever is necessary to prepare that media for clean removal. With an optical disc, this includes unmounting the filesystem (and any necessary cleanup related to the drive letter), and also includes sending a physical eject command to the optical drive. With a USB flash drive, it includes unmounting the filesystem, which likely also includes an implicit sync operation. If a new type of removable media comes along in the future, they'll probably preserve the same prepare-for-safe-removal interface, and make it do whatever the new type may need under the hood. I have always inferred that the only reason for the "eject" terminology is that the interface and terminology were established during a period before USB flash drives existed, when optical drives were the only removable media (other than floppy disks, which I think were already largely obsolete by the time this interface came along). I have always treated the *nix equivalent to "eject", for the purpose of a USB flash drive, as being 'umount /path/to/mount/location' - which, if I'm not mistaken, does include an implicit sync operation. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
signature.asc
Description: OpenPGP digital signature