mdoctorfat(1)

πŸ“¦
version 4.0.49 Β· 3 versions
, in alpine 3.23, alpine 3.24, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu resolute, ubuntu stonking

✨ NAME ✨

mdoctorfat β€” it doctors the allocation table of a file πŸ’…πŸ©Ί


⚠️ NOTE OF WARNING ⚠️

okay bestie, real talk first: this manpage was automatically generated from mtools's texinfo documentation, so it might not be 100% accurate or complete. πŸ™ˆ The end of this page tells you where to find the details on that. Don't come for me, I'm just the messenger. πŸ’€


πŸ’– DESCRIPTION πŸ’–

So mdoctorfat? It was initially intended as a test/debugging tool. Like, it's giving lab-experiment energy, not "safe for your actual data" energy. πŸ§ͺ

What it does:

  • lets you flag FAT clusters as bad blocks πŸ‘Ž
  • and it can also change the clusters allocated to a file

And here's the part where you hold my hand: no consistency check is done. None. Zero. Nada. And clusters that were previously allocated to the file are not freed. So like, it'll just leave them hanging. 😭

Use at your own risk. fr fr. This is the "back up your stuff first" kind of tool. 🫢

πŸŽ€ Syntax

mdoctorfat [-o offset] -b drive clusters
mdoctorfat [-o offset] [-s size] file clusters
  • If flag -b is present, the command marks the clusters as bad blocks rather than changing the allocation of a file. 🚩
  • If flag -b is not present, the command sets the clusters to allocated to the file. πŸ“Ž
  • If option -s is given in addition to the -b, this also changes the size in bytes of the file. πŸ“

🌸 The cluster list

The cluster list is represented as a sequence of clusters or cluster ranges. Example: 7-10 20 21-24. Each range needs to be a different parameter β€” like, separate args, bestie, don't smoosh them together. ✨

πŸ¦‹ The offset

If -o is given, this specifies an offset to be added to each cluster. And the offset is expressed in number of clusters, not bytes. iykyk. πŸ’œ


πŸ‘€ SEE ALSO πŸ‘€

Mtools' texinfo doc πŸ“š


🧚 VIEWING THE TEXI DOC 🧚

So this manpage was automatically generated from mtools's texinfo documentation. But the tea is: this process is only approximative, and some items β€” crossreferences, footnotes and indices β€” get lost in translation. πŸ˜” Like, these items literally have no appropriate representation in the manpage format. And on top of that, not all information has been translated into the manpage version.

So yeah, I strongly advise you use the original texinfo doc instead. The end of this manpage has the instructions on how to view it. πŸ‘‘

  • To generate a printable copy from the texinfo doc, run the following commands:
./configure; make dvi; dvips mtools.dvi
  • To generate a html copy, run:
./configure; make html

A premade html can be found at http://www.gnu.org/software/mtools/manual/mtools.html 🌈

  • To generate an info copy (browsable using emacs' info mode), run:
./configure; make info

And here's the aesthetic review: the texinfo doc looks most pretty when printed or as html. πŸ’– For real though β€” in the info version, certain examples are difficult to read due to the quoting conventions used in info. 😭 So, printed or html, bestie. Periodt.


okay that's the whole page!! this one's from mtools-4.0.49, dated 14Jun25 πŸ’… thanks for reading, mwah πŸ«ΆπŸ’–βœ¨