HFS(1)

πŸ’– HFS(1) β€” the shell for manipulating HFS volumes πŸ’–

okay bestie, so this is the manual page for hfs, living in the General Commands Manual section. Think of it as your group chat with an old Mac volume. 🫢


✨ NAME ✨

hfs β€” shell for manipulating HFS volumes


🌸 SYNOPSIS 🌸

hfs [hfs-path [partition-no]]

πŸ¦‹ DESCRIPTION πŸ¦‹

hfs is an interactive command-oriented tool for manipulating HFS volumes. no cap. it's giving "I talk to vintage Mac disks and I'm not sorry." πŸ’…

and here's the tea: hfs is based on the Tcl interpreter, so you can use basic Tcl constructs in addition to the commands below. two languages, one shell, main character energy fr fr. πŸ‘‘

the commands (aka the whole menu, do not skip a single one)

  • mount path [partition-no] β€” the specified UNIX path gets opened as an HFS volume. if you pass a partition number n and the volume source lives on a partitioned medium, the *n*th discovered HFS partition gets mounted. the default partition-no is 1.
  • umount [path] β€” unmounts the volume that was previously mounted from the specified path. if you don't give a path, it unmounts the current volume. bye bestie πŸ‘‹
  • vol path β€” makes the volume previously mounted from the specified path the current volume.
  • info β€” shows general info about the currently mounted volume. fun fact: this also pops up automatically when you mount a volume. it just wants attention. πŸ’–
  • pwd β€” shows the full path to the current working HFS directory.
  • cd [hfs-path] β€” changes the current working directory to the given HFS path. if you give no path, it chills you at the root of the volume.
  • dir [hfs-path] β€” shows a directory listing of the specified HFS directory. no path? you get the contents of the current working directory. ✨
  • mkdir hfs-path β€” creates a new, empty directory at the specified path.
  • rmdir hfs-path β€” removes the specified directory. it must be empty, no exceptions, no negotiating. πŸ’€
  • create hfs-path [type [creator]] β€” creates an empty file at the specified path. you can specify the Macintosh type and creator, or they default to TEXT and UNIX, respectively.
  • del hfs-path β€” deletes both forks of the specified file. both of them. gone. 😭
  • stat hfs-path β€” displays status info about the entity identified by the specified HFS path.
  • cat hfs-path β€” displays the data fork of the specified HFS file.
  • copyin unix-path [hfs-path [mode]] β€” copies the specified UNIX file to the named HFS destination path. unless you say otherwise, the file goes into the current HFS working directory using a heuristically chosen mode. the mode can be one of: macb (MacBinary II), binh (BinHex), text, or raw.
  • copyout hfs-path [unix-path [mode]] β€” copies the specified HFS file into the named UNIX destination path. unless you say otherwise, the file goes into the current UNIX working directory using a heuristically chosen mode. same modes as copyin, bestie. 🧚
  • format path [partition-no [volume-name]] β€” initializes the specified UNIX path as an empty HFS volume with the given name, and then mounts that volume. default volume name is Untitled. iconic default, honestly. 🌈

the plot twist πŸ‘€

the shell is scriptable, but you should understand that all of the commands above are actually implemented by Tcl procedures prefixed with the character "h" β€” like hmount, hcd, etc. β€” specifically to avoid name collisions with other Tcl utilities. so the "h" is there for a reason, iykyk.

for convenience, in interactive use you're allowed to omit the "h". periodt. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’€ BUGS πŸ’€

listen. cat can only display the data fork of a file. that's it. that's the limit.
also: text translations are performed unconditionally on the output. no asking, no opt-out.
and binary data cannot be handled properly from within Tcl scripts, because the character with value 0 cannot be represented in Tcl strings. tragic. genuinely tragic. 😭

if you need to copy files without these limitations, use copyout. it's the way. 🫢


πŸŽ€ AUTHOR πŸŽ€

Robert Leslie <rob@mars.org>


and that's the whole page, bestie β€” brought to you by HFSUTILS, dated 15-Jan-1997, which is giving vintage in the absolute best way. slay, go mount a volume, you've got this πŸ’–βœ¨