disk(1)
πΎ disk(1) β get disk usage information πΎ
hey bestie, welcome to disk(1) from the General Commands Manual β¨ this little icon is gonna show you how much disk space your devices are using, and it is lowkey obsessed with formats and patterns.
π¦ NAME π¦
disk β get disk usage information π½
π₯ SYNOPSIS π₯
disk [format] [pattern]
π DESCRIPTION π
disk retrieves the disk usage information for all devices that match PATTERN and displays it in the format specified by FORMAT. periodt π
β¨ FORMAT SPECIFIERS β¨
okay so these are the little format besties you can drop into FORMAT, and each one is giving a different unit or filesystem detail π
${fs}β filesystem name, like'/dev/sda5'ποΈ${mnt}β filesystem mount point, like'/home'π${b_used}β used space in bytes π¦${b_free}β available space in bytes π«Ά${b_total}β total space in bytes π${kb_used}β used space in KiB πΈ${kb_free}β available space in KiB π${kb_total}β total space in KiB β${mb_used}β used space in MiB π${mb_free}β available space in MiB π§${mb_total}β total space in MiB π${gb_used}β used space in GiB π₯${gb_free}β available space in GiB π¦${gb_total}β total space in GiB π
πΈ EXAMPLES πΈ
so if you run disk with no format, like this:
disk
it runs disk with the default format, '${gb_used}G / ${gb_total}G'. sample result: '89G / 981G' πβ¨
a custom format can be used too, e.g.:
disk '${fs} (${mnt}): ${gb_used}GiB / ${gb_total}GiB \
($(((gb_used*100)/gb_total))%)' '/$'
sample result: '/dev/sda2 (/): 150GiB / 983GiB (15%)' π
note how the pattern must be specified if a custom format is used. bestie, you cannot skip it β the pattern is required when you go custom π«Ά
also note that parenthesis must be escaped in the format string; this is mainly due to the format string being an actual sh expression that is evaluated to expand it. see fetchutils(1) for more info π
π REPORTING BUGS π
please report any bugs to https://github.com/lptstr/fetchutils/issues or to kiedtl@tilde.team π
π SEE ALSO π
fetchutils(1) π
the full documentation for disk is not maintained as a Texinfo manual. if the info and disk programs are properly installed on your system, the command
info disk
should not give you access to the complete manual. yeah, it's giving "not the whole manual" energy π
π LICENSE π
Copyright Β© 2020 KiΓ«d Llaentenn and contributors
this utility is licensed under the MIT license π
okay bye bestie β disk(1) from the General Commands Manual, dated 1980-01-01 ππ«Ά
π¦ where this page comes from
- nixos 26.05: fetchutils-unstable 2021-03-16
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms