dskutil(1)
πΎ dskutil β the sector editor that's lowkey iconic π
okay bestie, so this is dskutil(1), and it lives in the Emulators section of the manual. she's a simple sector editor for discs and disc images, and honestly? she's giving vintage-but-thriving. β¨
β¨ NAME β¨
dskutil β a simple sector editor for discs and disc images. (yes the original spells it "edtor", no we are not fixing it, we love her exactly as she is π«Ά)
πΈ SYNOPSIS πΈ
dskutil [-type TYPE] [-side SIDE] [-comp COMP] [-dstep] [-retry COUNT]
[-format FMT] DISKIMAGE
π¦ DESCRIPTION π¦
So dskutil is an interactive, command-driven sector editor, and she's patterned after the venerable CP/M sector editor DU90. Which, yes, explains a lot of her little idiosyncracies β for example, the way that commands deal in logical track numbers but physical sector numbers. That's just her vibe, iykyk. π
π OPTIONS π
-type TYPEβ picks which LibDsk driver gets used to access the disc. Your choices, queen:autoβ select according to the disc image file. This is the default. β¨dskβ use the DSK (CPCEmu format) image driver.edskβ use the extended version of the DSK format.floppyβ use the floppy driver.myz80β use the hard disk (MYZ80 format) image driver. (This format cannot be autodetected.)cfiβ use the CFI (DOS fdcopy format) image driver. (This format cannot be autodetected.)apridiskβ use the ApriDisk image driver (from the utility of the same name). (This format cannot be autodetected.)rawβ use the raw driver.
-comp COMPβ selects the compression method used on the disc image file. ngl this one has no effect when reading a floppy disc, so don't come for her.autoβ detect from the first few bytes of the file. This is the default.sqβ Huffman coded (SQ / USQ).gzβ Gzipped (gzip / gunzip).bz2β Burrows-Wheeler compressed (bzip2 / bunzip2).
-side SIDEβ decides which side (0or1) of the source disc gets scanned. If you don't pass this option, both sides get scanned. we love a thorough queen π-dstepβ double-step the source drive (used to read 360k discs in 1.2Mb drives). Only supported by the Linux floppy driver. no cap.-retry COUNTβ sets how many times to attempt a read/write/format in case of error. she's persistent, she's resilient. π«Ά-format FMTβ do not autodetect the disc format; use the named format instead. The format need only be an approximation to the actual format used by the disc. it's giving "close enough is fine, bestie".-first CYLβ start scanning at the specified cylinder.-last CYLβ scan up to and including the specified cylinder.
π COMMANDS π
Here come the single-letter commands, and they are so much. Operands in brackets like [filename] are optional. Numeric inputs show up as nn for decimal and xx for hex β and in either case, prefixing the number with # selects the alternate number system. π
Multiple commands on a line are allowed, separated by semicolons. periodt.
+[x]β increase the current sector number by[x]and read the resulting sector, incrementing the track if necessary.-[x]β decrease the current sector number by[x]and read the resulting sector, decrementing the track if necessary.#β display the disc geometry for the current drive/disc image. (iconic.)$[variable[=value]]β view and amend the geometry.$all by itself shows all possible variables with their current values;$variableshows the value of one variable; and$variable=valuesets a new value. π Note that changing the size of the sector with$secsize=nnwill cause the current sector buffer and clip buffer to be cleared.=asciiβ search for an ASCII string, starting at the current sector. Hex codes can be included in the ASCII by surrounding them with angle brackets β for example, to search for the word "Hello" at the start of a line, you could use=<0A>Hello. The search string is case-sensitive.<β save the currently-loaded sector to a clip buffer.>β restore the contents of the clip buffer to the current sector buffer.?β display a command summary.A[from,to]β dump the contents of the sector buffer as ASCII. Iffromandtoare included, then only values between those offsets will be shown.CHoffset,value,value,value...β change bytes in the current sector buffer. The offset and values are in hex.CAoffset,asciiβ replace bytes in the current sector buffer with an ASCII string. As with the=command, the ASCII can contain embedded hex bytes in angle brackets.CHfrom-to,value,value,value...β the same asCHabove, but fills the range fromfromtotowith the byte sequence, repeating or truncating it as necessary.CAfrom-to,asciiβ the same asCHfrom-to, except that the byte sequence is specified as ASCII.D[from,to]β dump the contents of the sector buffer as ASCII and hex.Gxxβ go to logical sector numberxx.H[from,to]β dump the contents of the sector buffer as hex.Kfilenameβ save all "yanked" sectors (seeYbelow) to the specified file. This also clears them from memory. bye babes πLfilename[,type[,compression]]β open a new drive or disc image. If this has a different sector size from the current sector size, the sector buffer and clip buffer will be cleared.N[geometry]β change geometry.Nby itself re-runs the automatic probe;Nwith the name of a geometry selects one of the formats known to LibDsk.Rβ (re)read the current sector.Snnβ set the current sector number, and read.Tnnβ set the current track number. Does not read.Vβ compare the contents of the sector buffer with the current sector on disc.Wβ write the sector buffer to disc. πXβ leavedskutil. (the goodbye button, she's emotional about it π)Yβ append the current sector to a "yank" buffer. It can then be saved with theKcommand.Z[nn]β sleep fornnseconds; ifnnis not present, sleeps for one second. nap queen. π/nnβ This must be the last command on a line. It repeats the preceding linenntimes.
π BUGS π
- On platforms with no
sleep(3)function, theZcommand works by busy-waiting. she's trying her best okay. - Commands are always input using
fgets(3), even when the host system provides a more sophisticated input method such asreadline(3). not her choice, not her problem. - While the current feature set is a fairly good match for
DU90(less the features specific to the CP/M filesystem) it doesn't cover all the features of LibDsk. no cap, that's just the truth.
π AUTHOR π
John Elliott <seasip.webmaster@gmail.com>. π
okay that's the whole page bestie, and the sign-off goes like this: this is Version 1.5.9, dated 17 September 2018, and she lives in the Emulators section. slay, hydrate, and always remember to R before you W. β¨ππ¦
π¦ where this page comes from
- debian bookworm: libdsk-utils 1.5.9+dfsg-1+b1
- debian trixie: libdsk-utils 1.5.9+dfsg-1+b2
- fedora 43: libdsk-tools 1.5.22-1.fc43 Β· LGPL-2.0-or-later
- fedora 44: libdsk-tools 1.5.22-2.fc44 Β· LGPL-2.0-or-later
- nixos 26.05: libdsk 1.5.22
- nixpkgs unstable: libdsk 1.5.22
- ubuntu jammy: libdsk-utils 1.5.9+dfsg-1
- ubuntu noble: libdsk-utils 1.5.9+dfsg-1build1
- ubuntu questing: libdsk-utils 1.5.9+dfsg-1build1
- ubuntu resolute: libdsk-utils 1.5.9+dfsg-1build2
- ubuntu stonking: libdsk-utils 1.5.9+dfsg-1build2
- Copyright (c) 2005-6 John Elliott
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms