Skip to main content

ncdu-compare

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

# measure current /var/log 
$ ncdu /var/log/ -0o /tmp/1

# create extra 1M file... and just wait
$ sudo dd if=/dev/zero of=/var/log/zzz.log bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00229604 s, 457 MB/s

# measure /var/log again
$ ncdu /var/log/ -0o /tmp/2

# see top usage
$ ncdu-compare /tmp/1 /tmp/2 | sort -n | tail -n 5
575 FILE /var/log/auth.log (273797 > 274372)
12209 FILE /var/log/daemon.log (62452009 > 62464218)
12286 FILE /var/log/syslog (63463377 > 63475663)
1048576 FILE /var/log/zzz.log (0 > 1048576)
1074015 DIR /var/log (3895153251 > 3896227266)

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

ncdu-compare-0.0.7.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

ncdu_compare-0.0.7-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file ncdu-compare-0.0.7.tar.gz.

File metadata

  • Download URL: ncdu-compare-0.0.7.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/6.0.0 pkginfo/1.9.6 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.2

File hashes

Hashes for ncdu-compare-0.0.7.tar.gz
Algorithm Hash digest
SHA256 17b0daf7aba2beb42b8f40d79f190d315c2f3896a983c7c718e494d720199f4f
MD5 1ee1c703e6f8a5193ddd8b11af9ee069
BLAKE2b-256 374d2efd358c16ef3b0f68fb1ee9373d504db033f0d0cfebc58049b285dba620

See more details on using hashes here.

File details

Details for the file ncdu_compare-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: ncdu_compare-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/6.0.0 pkginfo/1.9.6 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.2

File hashes

Hashes for ncdu_compare-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d40e43a05ad9dfad06f1b0a75a1568548177501885b1a56022b72c6e2974e7bc
MD5 41437b3f1a1a7a25ac7ab83c7d869d17
BLAKE2b-256 aae836970096936c53bb46c741bacac593e5177d4ad8442e0e56fff6f39a5b19

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