ncdu-compare
Compare ncdu export files and shows differences to find out what consumes most space.
Installation
# from pypi
pip3 install ncdu-compare
# ... or from git
pip3 install git+https://github.com/yaroslaff/ncdu-compare.git
Example usage
Create ncdu snapshots with command:
# now
$ ncdu /some/path/ -0o /tmp/snapshot-1
# after some time, e.g. daily
$ ncdu /some/path/ -0o /tmp/snapshot-2
Compare it
$ ncdu-compare /tmp/snapshot-1 /tmp/snapshot-2 | sort -n | tail -n 5
Example real output (first number is growth in bytes for sort -n, may be negative):
2125273220 DIR /home/username/public_html/client-portal/storage/framework/cache (18.96G => 21.09G (2.13G))
2125273220 DIR /home/username/public_html/client-portal/storage/framework/cache/data (18.96G => 21.09G (2.13G))
2125741830 DIR /home/username/public_html/client-portal/storage/framework (18.97G => 21.10G (2.13G))
2153400708 DIR /home/username/public_html/client-portal/storage (19.29G => 21.44G (2.15G))
3134727368 DIR /home/username/public_html/client-portal/public/alavie/customer_folder (36.76G => 39.90G (3.13G))
3146881276 DIR /home/username/public_html/client-portal/public/alavie (52.62G => 55.77G (3.15G))
4649987199 DIR /home/username/public_html/client-portal/public (158.13G => 162.78G (4.65G))
6803387907 DIR /home/username/public_html/client-portal (177.97G => 184.78G (6.80G))
6805286889 DIR /home/username/public_html (179.92G => 186.73G (6.81G))
Invalid unicode filenames
Sometimes ncdu can produce invalid JSON files (see https://dev.yorhel.nl/ncdu/jsonfmt). When loading ncdu files ncdu-compare uses (default) 'replace' mode to handle unicode errors. You can override it with -e/--error options, e.g. --error ignore. More at python doc to open().
See also
My other project Plus Size to detect changes in short-time (e.g. fast growing log files)
ncdu-diff C + Python ncdu fork that can compare and diff results
Metadata
Release files for ncdu_compare 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ncdu_compare-0.0.8.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ncdu_compare-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.8 kB
Release files / ncdu_compare-0.0.8.tar.gz
| Download URL | ncdu_compare-0.0.8.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3062b6af5373959c196a91f66f5df42f6fcafec54c416f79888ad4a419e9efe4
|
|
BLAKE2b-256 checksum How to use checksums |
d724455bbe4b4119e63a4e4cb321a8f79c4c473cffc53c8f0094428442b53b6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|
Release files / ncdu_compare-0.0.8-py3-none-any.whl
| Download URL | ncdu_compare-0.0.8-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a365378bbb23b37c7c03a7c1ff4db07e99aa85e4a44d00dbbb2652925faba4fe
|
|
BLAKE2b-256 checksum How to use checksums |
b58124072ef14e08c11221dd7a7042c8235ce70e2bf58ce8836856763639cbe2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|