Compare ncdu export files and show difference to find what took most space since previous measurement
Project description
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
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
Built Distribution
File details
Details for the file ncdu_compare-0.0.8.tar.gz
.
File metadata
- Download URL: ncdu_compare-0.0.8.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3062b6af5373959c196a91f66f5df42f6fcafec54c416f79888ad4a419e9efe4 |
|
MD5 | 9acb978d70ea1f2bd521bbb052ff34b9 |
|
BLAKE2b-256 | d724455bbe4b4119e63a4e4cb321a8f79c4c473cffc53c8f0094428442b53b6b |
File details
Details for the file ncdu_compare-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: ncdu_compare-0.0.8-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a365378bbb23b37c7c03a7c1ff4db07e99aa85e4a44d00dbbb2652925faba4fe |
|
MD5 | 2fc5b2034a1fd6246f7f8d5c83ae02a8 |
|
BLAKE2b-256 | b58124072ef14e08c11221dd7a7042c8235ce70e2bf58ce8836856763639cbe2 |