mattrib(1)

πŸŽ€ mattrib(1) β€” the manual, but make it cute πŸŽ€

okay bestie, listen up: this is the page for mattrib, living in the General Commands Manual section, and it's here to help you change MS-DOS file attribute bits. yes, really. the DOS era is calling and it's giving retro ✨


πŸ’– Name πŸ’–

mattrib β€” change MSDOS file attribute tags


⚠️ Note of warning ⚠️

ngl, this one's important, so read it: this manpage has been automatically generated from mtools's texinfo documentation, and it may not be entirely accurate or complete. 😭 see the end of this man page for the details, bestie β€” don't skip it.


🌸 Description 🌸

Mattrib is used to change MS-DOS file attribute bits. it has the following syntax:

mattrib [-a|+a] [-h|+h] [-r|+r] [-s|+s] [-/]  [-p] [-X] msdosfile [
msdosfiles ... ]

so the whole vibe: Mattrib adds attribute bits to an MS-DOS file (that's the '+' operator) or removes attribute bits (that's the '-' operator). pick your fighter πŸ’…

✨ the attribute bits it supports ✨

  • a β€” the Archive bit. some backup programs use it to flag a new file. πŸ†•
  • r β€” the Read-only bit. it marks a file as read-only, and fr fr files with this bit set cannot be erased by DEL nor modified. hands off. πŸ™…β™€οΈ
  • s β€” the System bit. MS-DOS uses it to indicate an operating system file. πŸ‘‘
  • h β€” the Hidden bit. it's how you make files hidden from DIR. peekaboo, you can't see me πŸ™ˆ

🌈 the command line flags it supports 🌈

  • / β€” Recursive. it recursively lists the attributes of the files in the subdirectories. down the rabbit hole we go πŸ‡
  • X β€” Concise. prints the attributes without any whitespace padding. and here's the tea: if neither the "/" option is given, nor the msdosfile contains a wildcard, and there is only one MS-DOS file parameter on the command line, then only the attribute is printed, and not the filename. this option is convenient for scripts 🫢
  • p β€” Replay mode. it outputs a series of mformat commands that will reproduce the current situation, starting from a situation as left by untarring the MS-DOS file system. commands are only output for attribute settings that differ from the default (archive bit set for files, unset for directories). this option is intended to be used in addition to tar. the readonly attribute is not taken into account, as tar can set that one itself. no cap. πŸ”₯

πŸ¦‹ See Also πŸ¦‹

Mtools' texinfo doc β€” go read it, iykyk πŸ’œ


🧚 Viewing the texi doc 🧚

so here's the situation: this manpage has been automatically generated from mtools's texinfo documentation. but this process is only approximative, and some items β€” like crossreferences, footnotes and indices β€” are lost in this translation process. indeed, these items have no appropriate representation in the manpage format. moreover, not all information has been translated into the manpage version. so i strongly advise you to use the original texinfo doc, bestie. see the end of this manpage for instructions how to view the texinfo doc. πŸ’–

  1. to generate a printable copy from the texinfo doc, run the following commands:
./configure; make dvi; dvips mtools.dvi
  1. 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 🌈

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

and the final vibe check: the texinfo doc looks most pretty when printed or as html. indeed, in the info version certain examples are difficult to read due to the quoting conventions used in info. 😭 iconic behavior honestly.


and that's the whole page, bestie!! this was mtools-4.0.49, dated 14Jun25, and it's your mattrib(1) manpage β€” slay, go forth and change those attribute bits πŸ’…βœ¨πŸ«Ά