Skip to main content

Directory summary tool.

Project description

DirStuff

Summarization

Summarize a directory recursively by file size. This tool can be used to quickly search a drive for large files taking up too much space.

Installation

Install the current PyPI release:

pip install dirstuff

Usage

# Run the tree command to summarize a directory
$ dirstuff tree <root-dir>

# Specify the minimum file size (default is 10MB)
$ dirstuff tree <root-dir> --size 750MB
$ dirstuff tree <root-dir> --size 50KB

# Print full absolute paths to directories instead of directory names
$ dirstuff tree <root-dir> --absolute
# Run the list command to find all directories with a matching name
$ dirstuff list <root-dir> <dir-name>

# Specify the minimum file size (default is 10MB)
$ dirstuff list <root-dir> <dir-name> --size 750MB
$ dirstuff list <root-dir> <dir-name> --size 50KB
from dirstuff.os import Path

Examples

Tree

# Summarize the /home/user/my_documents directory
# showing only directories greater than 20MB in size
$ dirstuff tree /home/user/my_documents --size 20MB
|->  69.0 GB > my_documents
    |->  67.8 GB > movies
        |->  62.0 GB > from_the_internet
        |->   5.8 GB > home_movies
    |-> 638.1 MB > photos
        |-> 368.2 MB > rock_concert
        |-> 251.6 MB > vacation_2019
        |->  18.4 MB > family_photos
    |-> 521.6 MB > work
        |-> 263.8 MB > boring_docs
        |-> 257.7 MB > reports
    |->  22.5 MB > games

List

# List all node_modules folders under the /home/user/my_code directory
$ dirstuff list ~/Documents/Code/Projects/Current node_modules
 |-> 419.6 MB > /user/my_code/portfolio/web/node_modules
 |-> 320.3 MB > /user/my_code/fun_project/node_modules
 |-> 298.1 MB > /user/my_code/simple_game/version_2/node_modules

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

dirstuff-0.1.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

dirstuff-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file dirstuff-0.1.0.tar.gz.

File metadata

  • Download URL: dirstuff-0.1.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.9.12 Darwin/22.6.0

File hashes

Hashes for dirstuff-0.1.0.tar.gz
Algorithm Hash digest
SHA256 49a43e76a71b8514085b5b07a0ba8e0a79d9e4fc0f76e76c3030e0f550feb407
MD5 dd42e8b80820f1d68c088ae1f0993841
BLAKE2b-256 85ef7350adc72813c6840cb67e921d102c077d120338a40a97669edafdfbcf2a

See more details on using hashes here.

File details

Details for the file dirstuff-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dirstuff-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.9.12 Darwin/22.6.0

File hashes

Hashes for dirstuff-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d6ca1ddcf09a4203109176291351da207d95bd950b11bde68fc40fb0bcc07f5
MD5 72017c4dc19f04f8925877186084c18e
BLAKE2b-256 202f6efd9ffb0c30536f9bb58c5ab500591f99a697daab826139a162f065cafe

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