DEVICE-TABLE(1)
π DEVICE-TABLE(1) π
okay so bestie, welcome to the device-table.pl manual β this is the User Contributed Perl Documentation page for it, and it's lowkey one of those little scripts that does one job and does it iconically. Here's the whole vibe. π«Ά
β¨ Name β¨
device-table.pl β it parses simple device tables and passes them along to mknod. that's it. that's the whole girlboss job description. π
πΈ Synopsis πΈ
device-table.pl [-n|--dry-run] [-d DIR] [-f FILE]
device-table.pl -?|-h|--help|--version
like, that's the entire interface. two modes: do the thing, or tell me about the thing. no cap. β¨
π Options π
so by default, device-table.pl writes out the device nodes in the current working directory. if you want them somewhere else, use the directory option. she's flexible, she just needs to be told. π¦
-n,--dry-runβ the dry-run option, bestie! it shows you the commands that would be run, without actually running them. it's giving look-but-don't-touch energy. perfect for a vibe check before you commit. π-d DIRβ the directory option</... wait no, the directory option β use it to write the device nodes out somewhere other than the current working directory. DIR is the place. π-f FILEβ the file option, which overrides the default file. and listen:multistrapalready contains a default device-table file, and the default is/usr/share/doc/multistrap/examples/device_table.txt. so if you don't like that one, you point it at your own with-f. β¨- no-fakeroot β so here's the tea β: device nodes need
fakerootor another way to use root access. ifdevice-table.plis already being run underfakerootor an equivalent, then the existingfakerootsession gets used β she'll just hop on the one you're already on. alternatively, use the no-fakeroot option to drop the internalfakerootusage entirely. π§ -?,-h,--help,--versionβ the "just tell me what's going on" flags. you know the drill. π
β οΈ ok important, don't skip this one:fakerootdoes not support changing the actual ownerships. so for that, you gotta run the final packing into a tarball underfakerootas well, or just use"sudo"when runningdevice-table.pl. this is a real caveat, not a drill, fr fr. π
π Device table format π
okay so the format section, and honestly it's giving strict:
device table files are tab separated value files (TSV). all lines in the device table must have exactly 10 entries, each separated by a single tab. the one exception? comments β and those must start with #. that's the whole rule, bestie, no wiggle room. π
device table entries take the form of:
<name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
where name is the file name, and type can be one of:
f A regular file
d Directory
s symlink
h hardlink
c Character special device file
b Block special device file
p Fifo (named pipe)
now, symlinks and hardlinks are extensions to the device table β they're just for device-table.pl, so heads up: other device table parsers might not handle these types. not everyone is on our level, iykyk. π
for the symlink command specifically, the first field is the existing target of the symlink, and the third field is the full path of the symlink itself. e.g.
/proc/self/fd/0 s /dev/stdin - - - - - - -
see also π http://wiki.debian.org/DeviceTableScripting
and that's the whole page, gorgeous. this one's perl v5.30.0, dated 2020-03-22, and it ate. πβ¨π bye bestie, go make some device nodes responsibly π«Άπ
π¦ where this page comes from
- debian bookworm: multistrap 2.2.11
- ubuntu jammy: multistrap 2.2.11
- ubuntu noble: multistrap 2.2.11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms