HLS(1)

πŸ’– HLS(1) β€” the manual, bestie edition πŸ’–

okay so real talk: hls is a General Commands Manual page, and it's literally the tool that lists files in an HFS directory. Buckle up, we're doing this together πŸŽ€


✨ NAME ✨

hls β€” list files in an HFS directory. that's it. that's the job. iconic behavior tbh πŸ‘‘


🌸 SYNOPSIS 🌸

hls [options] [hfs-path ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so hls lists the files and directories chillin' inside an HFS volume. the way that it works is if you hand it one or more arguments, it shows you each file or directory you named; if you don't hand it anything, it just shows you the contents of the current working directory. no cap, that's the whole vibe πŸ’…


✨ OPTIONS ✨

  • -1 β€” output formatted so every single entry gets its own line. this is the default when stdout is not a terminal, so like, scripts get this for free 🫢
  • -a β€” show all files and directories, including the "invisible" ones, as the Macintosh Finder would perceive them. normally invisible files get left out of directory listings entirely. not anymore bestie πŸ™ˆ
  • -b β€” special characters get displayed in an escaped backslash notation. normally, special or non-printable characters in filenames just get swapped out for a question mark (?), which is honestly kind of a jumpscare πŸ’€
  • -c β€” sort and display entries by their creation date instead of their modification date. time travel but make it organized ✨
  • -d β€” list the directory entries themselves rather than their contents. normally, when you name directories on the command-line, their contents are what gets shown. this flips that 🌈
  • -f β€” do not sort directory contents; list them in the order they appear in the directory. heads up: this option effectively enables -a and -U and disables -l, -s, and -t. it's giving chaos mode, lowkey πŸŒ€
  • -i β€” show the catalog IDs for each entry. every file and directory on an HFS volume has a unique catalog ID, so this is their little government name πŸͺͺ
  • -l β€” display entries in long format. this format shows the entry type (d for directory or f for file), flags (i for invisible), file type and creator (four-character strings, files only), size (the number of directory sub-contents, or file resource and data bytes, respectively), date of last modification (or creation, if you passed -c), and the pathname. also, Macintosh "locked" files are indicated by F in place of f. it's a whole info dump and we love her for it πŸ“‹
  • -m β€” display entries in a continuous format separated by commas. comma-separated cutie πŸ“
  • -q β€” replace special and non-printable characters in displayed filenames with question marks (?). this is the default when stdout is connected to a terminal.
  • -r β€” sort entries in reverse order before displaying. backwards but make it fashion πŸ’…
  • -s β€” show the file size for each entry in 1K block units. the size includes blocks used for both data and resource forks, so it's the full picture, fr fr.
  • -t β€” sort and display entries by time. normally files get sorted by name, but this option uses the last modification date to sort β€” unless -c is also specified, in which case it's creation date o'clock ⏰
  • -x β€” display entries in column format like -C, but sorted horizontally into rows rather than columns. same energy, different axis 🌸
  • -w width β€” format output lines suitable for display in the given width. normally the width gets determined from your terminal, from the environment variable COLUMNS, or from a default value of 80. it knows what it's doing, trust πŸ“
  • -C β€” display entries in column format with entries sorted vertically. this is the default output format when stdout is connected to a terminal. main character format, honestly πŸ‘‘
  • -F β€” cause certain output filenames to be followed by a single-character flag indicating the nature of the entry: directories get followed by a colon (:) and executable Macintosh applications get followed by an asterisk (*). little tags, big personality 🏷️
  • -N β€” cause all filenames to be output verbatim, without any escaping or question-mark substitution. raw. unfiltered. no notes.
  • -Q β€” cause all filenames to be enclosed within double-quotes (") and special/non-printable characters to be properly escaped. quoted and safe, the responsible bestie 🫢
  • -R β€” for each directory encountered in a listing, recursively descend into it and display its contents. it's giving inception, it's giving rabbit hole πŸ‡
  • -S β€” sort and display entries by size. for files, the combined resource and data lengths are used to compute a file's size. big files first energy (or last, depending on -r bestie) πŸ”₯
  • -U β€” do not sort directory contents; list them in the order they appear in the directory. on HFS volumes, this is usually an alphabetical case-insensitive ordering, although there are some idiosyncrasies to the Macintosh implementation of ordering. also note: this option does not affect -a, -l, or -s. read that twice, it matters πŸ“Œ

πŸ‘€ SEE ALSO πŸ‘€

hfsutils(1), hcd(1), hpwd(1), hdir(1), hcopy(1)

go read those too, they're the rest of the friend group πŸ«‚


πŸ“ FILES πŸ“

$HOME/.hcwd


πŸ’œ AUTHOR πŸ’œ

Robert Leslie <rob@mars.org>


and that's the whole page, bestie!! this was the HFSUTILS manual, dated 14-Jan-1997 β€” yeah she's vintage, she's a classic, she ate and left no crumbs πŸŽ€βœ¨ slay, periodt πŸ’