Package: duviz
What is duviz?duvizis a (Python 3) command-line tool to visualize disk space usage.It’s like the plethora of desktop applications and widgets
(e.g. Filelight, DaisyDisk, WinDirStat, JDiskReport, TreeSize, SpaceSniffer, …),
but instead of a fancy GUI with animated pie charts and shaded boxes
you get a funky “ASCII art style hierarchical tree of bars” in your shell.
If that didn’t make a lot of sense to you, look at this example of this/optfolder:$ duviz /opt
________________________________________________________________________________
[                                     /opt                                     ]
[____________________________________3.30GB____________________________________]
[                                    local                                     ]
[____________________________________3.30GB____________________________________]
[              var              ][        lib         ][ share  ][Libr][lib][]|
[_____________1.36GB____________][______925.47MB______][411.37MB][231.][222][]|
[           macports           ]|[gcc][gcc4][]|||      [][]||||||[Fra]|[gc] |
[____________1.36GB____________]|[250][226.][]|||      [][]||||||[231]|[21] |
[    software    ][distfile][]| |           ||  |      | ||||||||[Pyt] [x8]
[____785.31MB____][421.56MB][]| |           ||  |      | ||||||||[231] [21]
[gc][][]||||||||||||||||||||[]               |            ||| |  [Ve]  ||[]
[17][][]||||||||||||||||||||[]               |            ||| |  [23]  ||[]FeaturesBasically it consists of just one Python 3 scriptduviz.py.
No installation required: put it where you want it. Use it how you want it.Only uses standard library and just depends onduandlsutilities,
which are available out of the box on a typical Unix platform (Linux, macOS)Speed. No need to wait for a GUI tool to get up and running, let alone scanning your disk.
The hard work is done bydu(orls), which run an C-speed.Progress reporting while you wait. Be hypnotized!Detects your terminal width for maximum visualization pleasure.Not only supports “disk usage” based on file size,
but also allows to count files (inode count mode)
or give a size breakdown of ZIP or tar files.Option to use terminal colors for the boxes instead of ASCII artInstallationPip basedduviz can be installed with pip in a desired virtual environment:pip install duvizwhich will install aduvizcommand line utility in your environment.If you already havepipxon your toolbelt,
you might prefer to install duviz in an automatically managed,
isolated environment withpipx install duviz.With Homebrewduviz can also be installed withHomebrew:brew install https://raw.github.com/soxofaan/duviz/master/extra/homebrew/duviz.rbNo installationThe fileduviz.pyis also designed to be usable as a standalone Python script,
without having to install it.
Downloadduviz.pyand just run it:python path/to/duviz.pyPython 2 Supportduvizwas originally (2009) a Python 2 script, and started supporting Python 3 around 2016.
With the end of life of Python 2 nearing in 2019, support for Python 2 was dropped.
The Python 2 compatible version can be found in thepy2-compatiblebranch (last release: 1.1.1).UsageIf you runduvizwithout arguments, it will render the disk usage of the current working folder.
If you specify one or more directories, it will render the usage of those directories, how intuitive is that!Instead of size in bytes, you can also get inode usage: just use the option--inodes(or-iin short).If you directly passduviza ZIP or tar file,
it will visualize the size breakdown of the file tree in the ZIP/tar file.
In case of ZIP files, the compressed size will be shown by default
(option--unzip-sizewill toggle showing of decompressed size).
For tar files, only the decompressed size is available.Run it with option--helpfor more options.