fdflush

Flush out-of-date disk buffers

Install

All systems
curl cmd.cat/fdflush.sh
Ubuntu
apt-get install fdflush
Windows (WSL2)
sudo apt-get update sudo apt-get install fdflush
Raspbian
apt-get install fdflush

fdflush

Flush out-of-date disk buffers

fdflush is a band-aid for floppy (or other) drives with bad disk-change sensing. fdflush makes the system believe the disk-change switch has been triggered forcing the system to discard the buffered data. If you have one of these slightly-broken disk drives, you'll have to run fdflush every time you change a disk. fdflush is useful for computers which might be sleeping when you change floppies or other removable media. The command "floppycontrol -f" does the same thing, but the fdutils package is significantly larger; it only uses the floppy-specific flush ioctl. The command "blockdev --flushbufs" only uses the generic flush ioctl.