<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gbos.git/usr/help.c, branch master</title>
<subtitle>gbos - a tiny Unix-flavored OS for the Game Boy Color (kernel, shell, coreutils in C, RAM filesystem)</subtitle>
<id>https://git.sl0p.foo/gbos.git/atom/usr/help.c?h=master</id>
<link rel='self' href='https://git.sl0p.foo/gbos.git/atom/usr/help.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/'/>
<updated>2026-09-24T10:48:51Z</updated>
<entry>
<title>usr: ls -l, df, mv, tail, tee, sleep, help, poweroff</title>
<updated>2026-09-24T10:48:51Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-09-24T10:48:51Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/commit/?id=65b53de14dc6918db39b6ee6dc032f805182daad'/>
<id>urn:sha1:65b53de14dc6918db39b6ee6dc032f805182daad</id>
<content type='text'>
Filling in the core utilities the box was missing:

- ls -l: type, links and size, now that stat() exists. The screen is 40
  columns, so it is "d  1   256 name", not the GNU sprawl. Sizes were
  previously unknowable except one file at a time with wc -c.
- df: blocks and inodes, used and free, on the 32 KiB cart disk.
- mv: no rename syscall, so it is cp + rm - and the copy has to finish before
  the source goes, or a failure loses the file.
- tail [-n N]: no seek syscall, so it streams the input through a ring of N
  lines rather than jumping to the end. N is capped by that ring.
- tee: the missing half of a pipeline - `cat big | tee copy | wc -l`.
- sleep: the thing every script needs; the kernel counts 1/64 s ticks.
- help: lists every command the shell knows, walked out of the kernel's own
  name table. The box previously had no way to tell you what it could do.
- poweroff: the only safe way to stop a gbos that has data on it. The cart's
  battery RAM is written when the emulator exits cleanly, so killing it loses
  the whole filesystem - it comes back "formatted". Found while testing /rc.
</content>
</entry>
</feed>
