PYDF(1)

πŸ’Ύ PYDF β€” like df but make it fashion πŸ’…

okay bestie, gather round, because pydf is about to become your new main character. it's a little program (from the General Commands Manual section, iykyk) that tells you how much disk space is left on your mounted filesystems, and it does it in colours, one colour per filesystem type, because we deserve nice things. πŸŽ€


✨ NAME ✨

pydf β€” report colourised filesystem disk space usage πŸ¦‹


🫢 SYNOPSIS 🫢

pydf [options] [file]

πŸ’– DESCRIPTION πŸ’–

pydf is a python script, no cap. it shows you how much disk space is available on all your mounted filesystems, and it uses different colours for different types of filesystems so you can tell them apart at a glance. and the best part? the output format is completely customizable. you can make it look however you want. obsessed. ✨

and like, if you pass it an optional file argument? it stops doing the whole-everything thing and just shows you info about the filesystem(s) that contain that file (or those files). no file argument, no problem β€” then it shows you info about all mounted filesystems. periodt. πŸ’…


🌸 OPTIONS 🌸

  • --help β€” shows you a lil summary of the options. your cheat sheet bestie. πŸ“
  • -v, --version β€” shows the version of the program. flex the build. πŸ‘‘
  • -a, --all β€” include filesystems that have 0 blocks. yes, even the empty ones. nobody gets left out. 🫢
  • -h, --human-readable β€” prints sizes in human readable format (e.g., 133K 2341M 2448G). for when you don't wanna read raw numbers like a calculator. 😭
  • -H, --si β€” likewise, but use powers of 1000 not 1024. metric girlies rise. 🌈
  • --block-size=SIZE β€” use SIZE-byte blocks. you pick the unit, you're the boss. πŸ’…
  • -k, --kilobytes β€” like --block-size=1024. ✨
  • -i, --inodes β€” show information about inodes instead of blocks. different metric, same drama. πŸ¦‹
  • -l, --local β€” limit the listing to local filesystems only. no network nonsense today. 🚫
  • -m, --megabytes β€” like --block-size=1048576. πŸ’–
  • -g, --gigabytes β€” like --block-size=1073741824. big numbers energy. πŸ”₯
  • --blocks β€” use the filesystem's native block size. au naturel. 🌿
  • --bw β€” do not use colours. (sad, but sometimes you need it. it's giving monochrome.) πŸ’€
  • --mounts=FILE β€” the file to get mount information from. on a normal linux system, only /etc/mtab or /proc/mounts make sense. use /proc/mounts when /etc/mtab is corrupted or inaccessible β€” though ngl, the output looks a bit weird in this case. πŸ™ˆ
  • -B, --show-binds β€” also show mount --bind mounted filesystems. show me everything. πŸ‘€
  • -S, --scale-bars β€” show bar sizes scaled to the largest filesystem size. proportional slay. πŸ“Š

πŸ’€ BUGS πŸ’€

okay so this is the messy part, and you need to know it.

POSIX mandates that f_blocks and f_bfree be the number in units of f_frsize. however β€” and this is the tea β˜• β€” many programs are buggy, including df(1) from coreutils, and the Linux kernel often lies and reports f_frsize == f_bsize. some filesystems and some other operating systems don't do that, and when that happens, the size reported by pydf is incorrect. 😭

as a stopgap measure, there's a parameter called statvfs_block in /etc/pydfrc where you can force f_frsize or f_bsize. use it. trust. 🫢


πŸŽ€ FILES πŸŽ€

  • /etc/pydfrc β€” main configuration file πŸ‘‘
  • ~/.pydfrc β€” per-user configuration file πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

  • df(1) β€” the classic. we still love her. 🫢

πŸ’œ AUTHOR πŸ’œ

Radovan GarabΓ­k <garabik@kassiopeia.juls.savba.sk> β€” thank you for this gift, king. πŸ™βœ¨


and that's the whole vibe check, bestie. this page lives in the General Commands Manual section and it's filed under PYDF(1) β€” so go forth, run pydf, and admire your filesystems in full colour. πŸŒˆπŸ’– no cap, you're gonna be obsessed. πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from