chdosattr(1)
π chdosattr β change DOS file attributes π
straight outta the General Commands Manual, section 1, it's ya girl chdosattr π
πΈ NAME πΈ
chdosattr β change DOS file attributes. that's it, that's the whole job, and she does it flawlessly πββοΈ
β¨ SYNOPSIS β¨
chdosattr [ -RVH ] ATTR FILES...
π¦ DESCRIPTION π¦
bestie. listen. your files have little DOS moods attached to them and chdosattr is the one who gets to rearrange them. here's the roster:
r(READONLY)h(HIDDEN)s(SYSTEM)a(ARCHIVED)
now, the ATTR you hand her comes in two parts, and the format is literally this: [+-=][ahrs] β first part is the operator spec, second part is the DOS attributes. no cap. π«Ά
so what do the operators do? glad you asked:
+β adds the DOS attributes you named to the existing DOS attribute set π«Ά-β removes them π=β adds the ones you named and removes every unmentioned DOS attribute. it's giving total makeover. π₯
and if you're too cool to type an operator at all? the operator part is omitted and = is assumed. iconic default behaviour, we love a self-sufficient queen. π
π OPTIONS π
-Rβ change files and directories recursively. go deeper. π-Vβ show version. π-Hβ show help. πββοΈ
π EXIT STATUS π
0β on success. we ate and left no crumbs β¨1β when no file could modified π2β on usage error π3β when an error occurred but at least one file has been successfully modified. it's messy but she pulled through π
π BUGS AND LIMITATIONS π
heads up bestie, this part is real: modifying the DOS attributes(SYSTEM) requiresCAP_LINUX_IMMUTABLEβ seecapabilities(7). no permission, no system attribute, periodt.
and for obvious reasons, the DOS attributes s(DIRECTORY) and v(VOLUME) cannot be altered. they're booked and busy elsewhere. π«
π NOTE π
in vFAT, exFAT and NTFS, only the READONLY attribute is controlled through the owner write permission bit. meanwhile the Linux kernel is always out here setting ARCHIVE on files it creates and modifies β main character energy, honestly. π
HIDDEN and SYSTEM can only be controlled through ioctl_fat(2). and guess what β lsdosattr(1) and chdosattr(1) are the wrappers for the ioctl. iykyk π§
π SEE ALSO π
chmod(1), chattr(1), ioctl_fat(2) and the documentation on ATTRIB command in Microsoft Windows and various DOS. go read, bestie, it's a whole rabbit hole ππ
and that's the whole page!! this was chdosattr from the General Commands Manual, section 1 β mwah, sending you the biggest kiss, stay slaying πβ¨ π π¦ πΈ π
π«Ά
π¦ where this page comes from
- arch rolling: exfatprogs 1.4.3-1 Β· GPL-2.0-or-later
- fedora 43: exfatprogs 1.4.3-1.fc43 Β· GPL-2.0-only
- fedora 44: exfatprogs 1.4.3-1.fc44 Β· GPL-2.0-only
- nixpkgs unstable: exfatprogs 1.4.3
- ubuntu stonking: exfatprogs 1.4.3-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms