announcing Disk Top Ten (dtt) 1.0a, a "where's my disk space" utility
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
announcing Disk Top Ten (dtt) 1.0a, a "where's my disk space" utility
dtt picks up where du leaves off. It quickly summarizes filesystem usage into a "top ten" list of the largest directory trees or individual objects. For example:
If you can't reach the site, you are connecting from a country that it's shielded from because of high attack rate -- at the moment that's CN, VN, RU, HK, SG, IN, KR, TW, BR, JP, FR, and ID. Let me know which country and and I'll lower shields for you.
#!/bin/bash
# Script to show a quick summary of a directory's disk usage.
# Defaults to current directory
DIR=${1:-$(pwd)}
# Handle the "." directory case so that grep works
[[ $DIR == "." ]] && EDIR="\." || EDIR=$DIR
du -c "$DIR" | grep -v "$EDIR$" | sort -k1nr
It avoids the -s option to du so that large files will show and the -h option to du so that the following sort will work. The output can be piped to 'head -10'
Well yes, but actually no. That approach can only tell you the ten largest objects one level below a given root node. dtt goes further. It actually focuses in on the ten largest individual subtrees at any level below the root node. When your question is where exactly did my space go, it's a much more helpful answer.
Here's a head to head comparison where I ask both tools the same question.
What I learn immediately from dtt is that I should consider whether to keep Python, GCC, Tex, Rust, Firefox, and Thunderbird. du on the other hand just says do more research starting from lib64.
And this has a different problem -- it gives redundant results that mask out other directories I should be looking at. This approach and the one identified by 0XBF are exactly the limitations I ran into with du, and why I wrote dtt.
The du approach tells me to look at /usr/doc/rust-1.58.1/html, and at /usr/doc/rust-1.58.1 and at /usr/doc, but dtt tells me the problem is /usr/doc/rust-1.58.1/html/core and then moves on to other subtrees.
I raised the block on FR, you should have no trouble now.
Yes, thanks. But the archive dtt-1.0a-noarch-1.tar.gz is not compressed as a Slackware package
Code:
LANG=C tar xzf dtt-1.0a-noarch-1.tgz
tar: .: Cannot utime: Operation not permitted
tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
tar: Exiting with failure status due to previous errors
This extracts the folders usr and install though. Wondering how you built this archive.
Version 1.0.1a released.
This corrects various documentation problems.
There are no functional differences.
At chrisretusn's suggestion, added a package tag.
and the build number documented there isn't followed by a package tag. Where can I learn about package tags?
The TAG is not part an official Slackware package which consist of name-version-arch-build. With 3rd party packages it is a common practice to use a tag to differentiate a official Slackware package from a 3rd party package. It's not well documented it is referenced here: https://www.slackwiki.com/Building_A_Package.
All of my scripts contain the following variables.
Note: My scripts only build for x86_64 architecture. Before I switched to that I used $(arch) in place of x86_64 or $(uname -m) later on in the script when determining architecture.
The use of tags helps tell an official Slackware package from non-official packages. I even add tags to stock packages that modify the SlackBuild for my purposes. Examples:
My packages: Cython-0.29.30-x86_64-1cgs.txz; cups-2.4.2-x86_64-4cgs.txz; imagemagick-7.1.1_7-x86_64-1cgs.txz
Slackware official packages: Cython-0.29.28-x86_64-1; cups-2.4.2-x86_64-4.txz; imagemagick-7.1.1_7-x86_64-1.txz
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.