Reading and writing HFS floppies
Transferring files from classic to modern Mac OS
hfsutils manpage :: OS X Daily article
This is a slightly-janky way to copy files to and from HFS-formatted floppies created on System 6 or 7. It works on modern macOS with a USB floppy drive and 1.44 MB disks. 400K and 800K disks don’t work in modern drives.
Setup
Install hfsutils via Homebrew.
brew install hfsutils
You need root access to do anything else beyond this point, so run sudo -s to get a root shell.
The utilities try to be smart about where the files are located, so prefix all disk paths with : to ensure it looks at the floppy drive instead of the local filesystem.
Usage
Use diskutil list to find the floppy drive’s device name /dev/diskN.
$ diskutil list
[...]
/dev/disk14 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: *1.5 MB disk14
Mount the disk and do copy operations.
hmount /dev/diskN # mount the floppy drive
hls # get a list of files
hcopy :diskfile ~/localfile # copy FROM floppy
hcopy ~/localfile :diskfile # copy TO floppy
humount # unmount the floppy drive
Copying to disk will result in files that do not have the correct creator and type codes, so they won’t be recognized by the classic Mac. Use hattrib to set the correct attributes.
hattrib -c 'ttxt' -t 'TEXT' :diskfile # SimpleText