FSCK.CPM(1)

πŸ“¦
version 2.23 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– FSCK.CPM(1) β€” the check-a-CP/M-file-system girlies' manual πŸ’–

okay so bestie, welcome to fsck.cpm, a user command, and honestly? she's a little icon. let's get into it.


✨ NAME ✨

fsck.cpm β€” check a CP/M file system 🩺


✨ SYNOPSIS ✨

fsck.cpm [-f format] [-n] [-u] image

✨ DESCRIPTION ✨

fsck.cpm is literally here to check and repair a CP/M file system. no cap.

so here's the vibe: after she reads the directory, she does two passes. two. because one pass is not enough for a queen πŸ’…

Pass one goes through the extent fields and checks them for range and format violations, specifically:

  • bad status
  • extent number
  • last record byte count
  • file name
  • extension
  • block number
  • record count
  • size of .COM files
  • time stamp format
  • invalid password characters
  • invalid time stamp mode

Pass two checks extent connectivity, which means:

  • multiple allocated blocks
  • duplicate directory entries
🫢 real talk: fsck.cpm can not yet repair all errors. she's doing her best, okay?? some things are simply beyond her.

✨ OPTIONS ✨

  • -f format β€” use the given CP/M disk format instead of the default format. your format, your rules πŸ’–
  • -T libdsk-type β€” libdsk driver type, e.g. tele for Teledisk images or raw for raw images. ⚠️ this one requires building cpmtools with support for libdsk, so if you didn't do that, no dice.
  • -n β€” open the file system read-only and do not repair any errors. she's just looking respectfully πŸ‘€ no touchy.
  • -u β€” show all CP/M file names in UPPER CASE. SCREAMING IS A VALID AESTHETIC.

✨ RETURN VALUE ✨

upon successful completion, exit code 0 is returned. slay. ✨


✨ ERRORS ✨

any errors are indicated by exit code 1. πŸ’€


✨ FILES ✨

  • /etc/cpmtools/diskdefs β€” CP/M disk format definitions

✨ ENVIRONMENT ✨

  • CPMTOOLSFMT β€” default format

✨ DIAGNOSTICS ✨

the output looks like this:

image: used/total files (n.n% non-contiguos), used/total blocks

and it means: no inconsistencies could be found. πŸŽ€

okay but let's unpack that, because it's giving "technically true but also kinda weird":

  • the number of used files is actually the number of used extents. since a file may use more than one extent, this may be greater than the actual number of files. but a correct measure would not reflect how many files could still be created at most. so like… it's the useful number, not the literal number. iykyk.
  • a file is considered fragmented if sequential data blocks pointed to by the same extent do not have sequential block numbers.
  • the number of used blocks includes the blocks used for system tracks and the directory.

✨ AUTHORS . ✨

this program is copyright 1997–2021 Michael Haardt <michael@moria.de>. 🫢

the Windows port is copyright 2000, 2001, 2011 John Elliott <jce@seasip.demon.co.uk>.

this program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU General Public License for more details. 🫠

you should have received a copy of the GNU General Public License along with this program. if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


✨ SEE ALSO ✨

fsck(8), mkfs.cpm(1), cpm(5)


and that's the whole page, bestie!! this one's from CP/M tools, dated November 2, 2022 β€” literally iconic of her. go forth and check those file systems, mwah πŸ’‹βœ¨πŸ’–

πŸ“¦ where this page comes from