maux
Star on GitHub Buy me a coffee

Manual / chtyp

chtyp(1)

CHTYP(1) General Commands Manual CHTYP(1)

chtyp - change a file's ProDOS type and auxiliary type

chtyp [-t type] [-a aux] file ...

Set the ProDOS file type, the auxiliary type, or both. At least one of the two options is required; naming neither is an error rather than a command that rewrites each file with its own current values.

The type is not decoration. On ProDOS it is where "can this be run?" lives, and this system loads a program at the address in its auxiliary type, so a binary built here needs both set before it will run.

The file type, written as a decimal number, a $ followed by hexadecimal digits, or one of the mnemonics TXT, BIN, DIR, SYS, BAS, INT, VAR, REL, RELM, PAS, ATK, S16. Mnemonics may be typed in either case. A value that does not fit in one byte is refused.
The auxiliary type, as a decimal or $ hexadecimal number from 0 to 65535.

Everything else the directory entry holds - the access byte, the modification date and time, the length - is read before the change and written back unaltered.

Stamp an assembled program so it can be run:

chtyp -t BIN -a '$0800' MYPROG

Mark a file as text again after editing it as data:

chtyp -t TXT NOTES

/usr/man/CHTYP this page

chmod(1), file(1), ls(1)

Exit status is 0 if every named file was changed, 1 if any file could not be read or written, and 2 for a usage error. A file that cannot be reached is reported and the remaining files are still changed.

A $ must be quoted, because the shell would otherwise expand it: write '$F8' or \$F8. An unquoted $F8 usually reaches this program as nothing at all, which is a usage error here rather than a silent change to type zero.

There is no -l option to stamp a file for a language. GNO/ME's version has one, naming ORCA and APW compilers; those are auxiliary-type conventions of a toolchain that does not exist on this machine.

September 21, 2026 maux