Skip to content

rm 0.1

Choose a tag to compare

@creep-ltx creep-ltx released this 27 Jul 19:34
· 157 commits to main since this release

The missing family member — a Unix-style delete for AmigaDOS. C:Delete exists; rm is the muscle memory, with the family manners: bundled -rfv flags, its own AmigaDOS pattern matching, one bad item never kills the batch, a "not deleted:" summary at the end, and rm ? for usage.

Careful by default, in this family's way:

  • Directories need -r, like Unix (and unlike Delete ALL's promptless enthusiasm). The tree is walked with an explicit work list, every directory scanned to completion before anything inside it is deleted, and directories removed deepest-first once their contents are gone. A child that refuses to go leaves its whole parent chain standing, each reported honestly.
  • -f means force, the Amiga way: a delete-protected file (the d bit) is skipped and listed by default; with -f the protection is stripped and the delete retried. A file another task holds open always refuses — -f cannot unlock it. -f also silences "no match".
  • Volume roots are refused unconditionally. rm -rf dh0: answers "refusing to remove a volume root", full stop — no flag overrides it.
  • Links are deleted as links, never followed — soft links and hard directory links both: the entry goes, the target stays, and a linked ancestor can never turn -r into a cycle.
  • -v lists each object as it goes; Ctrl-C is honoured between entries. Return code: 0 clean, 5 skipped (listed), 10 failed, 20 break.

Boot-verified on AmigaOS 3.2: the d-bit pair with and without -f, a protected leaf keeping its parents alive, in-use refusal, root refusal, and deep trees deleting in exact post-order.

Needs Kickstart 2.04+.

Download rm-0.1.lha below - the auto-generated Source code links are snapshots of the whole AmigaTools repo, not just rm.