Skip to main content

Display the output of "du" in a window.

Project description

pyxdu

Pyxdu — display the output of "du" disk usage tool in a window.

Pyxdu is a Python port of "xdu", an X window disk usage utility. Pyxdu is a retro tool that tries to follow the style of 1990s in its visual design.

PyPI PyPI - Downloads

Example

Run "du" to show disk usage for directory /usr in megabytes, pipe the output to "pyxdu", sort directories in numerical order:

du -m /usr | pyxdu -n

Dark theme

Installation

You can install pyxdu on Python 3.7 or newer using pip:

pip install pyxdu

Description

Pyxdu is a program for displaying a graphical tree of disk space utilization as reported by the UNIX utility "du". The user can navigate through the tree structure and change the order of the displayed information. The window is divided up into several columns, each of which is one level deeper in the directory hierarchy (from left to right). Boxes are drawn for each directory. The amount of vertical space occupied by each box is directly proportional to the amount of disk space consumed by it and all of its children. The name of each directory and the amount of data are displayed provided that there is enough space within its box. Any space at the "bottom" of a box not covered by its children to the right represents the space consumed by files in that directory (as opposed to space from its children).

There are several command line options available.

  • -h --help
    • Show help message.
  • -n
    • Sort in numerical order.
  • --dump <file>
    • Dump tree as JSON for debugging.
  • -c --columns <num>
    • Display <num> columns [default: 6].
  • ...

Mouse Actions

The user can move up or down the tree by clicking the left mouse on a directory box. If the left most box is selected, the display will move up one level (assuming you are not already at the root). If any other box is selected, it will be placed against the left edge of the window, and the display will be rescaled appropriately. At any time the middle mouse will bring you back to the root. Clicking the right mouse will exit the program.

Keystrokes

  • 1-9, 0
    • Sets the number of columns in the display (0 = 10).
  • /
    • Goto the root.
  • q, Escape
    • Exit the program.
  • ...

Development

Development requirements:

Set up a development environment:

git clone https://github.com/vlasovskikh/pyxdu.git
cd pyxdu
poetry install
poetry run pyxdu --help
du | poetry run pyxdu

Authors

Credits

The original tool xdu was released by Phil Dykstra on 1991-09-04. The most recent version xdu 3.0 was released on 1994-06-05.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxdu-0.1.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

pyxdu-0.1.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file pyxdu-0.1.1.tar.gz.

File metadata

  • Download URL: pyxdu-0.1.1.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Darwin/20.3.0

File hashes

Hashes for pyxdu-0.1.1.tar.gz
Algorithm Hash digest
SHA256 86bb059f03dbfb1c9826f4b6d790e99a7d11650310368d432fb9e80dfe69be12
MD5 9d2d751d868ae7c4d3816f171a21409d
BLAKE2b-256 bdbf14459b0e996710c78ff732c9c26ceda5f93feb4c682d259b4b3bccfe878e

See more details on using hashes here.

File details

Details for the file pyxdu-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyxdu-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Darwin/20.3.0

File hashes

Hashes for pyxdu-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99dfa8bbb84681862e6bccfbe1873fd3f5baa2084c95a323d54c484e38005a51
MD5 1917bf9bdf20331c1a0c69b4d1e7ab16
BLAKE2b-256 027e2dbb2507e36f94890c9fd269bec388f7939dc63d30928a4edfd65bce45b6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page