Skip to content

dm cat

'dm cat' works like the unix 'cat' command, but from CBM container formats (like disk images and archive files). Adopting a hallmark of unix command design, 'dm cat' streams data from those containers to stdout; using shell output redirection, that data can be written to files or piped to another command. 'dm cat' makes heavy use of the CBM $elector syntax in order to identify the files or data that should be streamed.

Features

  • works with both file-based selectors and data-based (track/sector) selectors.
  • binary data will not be streamed to a tty
  • there is very basic support for converting/streaming a SEQ file to a tty as strict US-ASCII (7-bit).
  • support for Unicode filenames and Windows 'long' paths.

Examples

Stream the named file on the .d64 and save it to a new file in the current working directory:

dm cat disk.d64:FILE > file.prg

Stream the first file on the .d64 and check its size using the 'wc' unix command:

dm cat disk.d64:#0 | wc -c

Stream the entire directory chain and pipe it through petxd in color and as lower/upper:

dm cat disk.d64:$ | petxd -Cc

Stream a file from inside the .lnx archive on the .d64; this example assumes the file 'docs' is a SEQ file and would therefore be converted to US-ASCII and output to the terminal:

dm cat disk.d64:game.lnx:docs