QDIRSTAT-CACHE-WRITER(1)

πŸ’– NAME πŸ’–

qdirstat-cache-writer β€” a lil script bestie that writes QDirStat cache files from cron jobs πŸŽ€


🌸 Usage 🌸

qdirstat-cache-writer [-ldvh] <directory> [<cache-file-name>]

So basically you hand it a <directory> and optionally a <cache-file-name>, and it does its thing. If you don't pass a <cache-file-name>, it defaults to .qdirstat.cache.gz sitting inside <directory>. Periodt. πŸ’…

And if your <cache-file-name> ends with .gz, it gets compressed with gzip β€” cute, right? And heads up: qdirstat can read gzipped and plain text cache files, so no stress either way. ✨


✨ OPTIONS ✨

  • -l β€” long format: always add the full path, even for plain files 🫢
  • -m β€” scan mounted file systems (aka cross file system boundaries, live a little) πŸ¦‹
  • -v β€” verbose, so it tells you everything going on
  • -d β€” debug mode πŸ›
  • -h β€” help (this very usage message, iconic) πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

OK so here's the tea: QDirStat can read all its info from cache files, and that is so much faster than the alternative. The alternative being: reading every single directory in a tree and getting detailed info (size, type, last modification time) for each file and directory using the opendir() / readdir() and lstat() system calls, one by one. Exhausting. 😭

Now, QDirStat can totally write those cache files itself β€” it's the "Write Cache File..." option in the "File" menu, iykyk. But the whole point of cache files is being able to do it in the background while the user isn't sitting there waiting, like in a cron job running in the middle of the night πŸŒ™. And QDirStat itself literally cannot do that, because it's a KDE program, which means it's an X program, which means it needs access to an X display β€” and cron does not provide that. So... yeah. That's why this script exists. No cap. πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

This manual page was written by Patrick MatthÀi <pmatthaei@debian.org> for qdirstat. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. 🫢


And that's the whole vibe check, bestie β€” this page is from the General Commands Manual, dated July 2017. Go forth and cron responsibly. πŸ’–πŸŒˆβœ¨