# DirSum
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:
```bash
pip install dirsum
```
## Usage
```bash
# Run the tree command to summarize a directory
$ dirsum tree <root-dir>
# Specify the minimum file size (default is 10MB)
$ dirsum tree <root-dir> --size 750MB
$ dirsum tree <root-dir> --size 50KB
# Print full absolute paths to directories instead of directory names
$ dirsum tree <root-dir> --absolute
```
```bash
# Run the list command to find all directories with a matching name
$ dirsum list <root-dir> <dir-name>
# Specify the minimum file size (default is 10MB)
$ dirsum list <root-dir> <dir-name> --size 750MB
$ dirsum list <root-dir> <dir-name> --size 50KB
```
## Examples
### Tree
```bash
# Summarize the /home/user/my_documents directory
# showing only directories greater than 20MB in size
$ dirsum tree /home/user/my_documents --size 20MB
```
```python
|-> 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
```bash
# List all node_modules folders under the /home/user/my_code directory
$ dirsum list ~/Documents/Code/Projects/Current node_modules
```
```python
|-> 419.6 MB > /hume/user/my_code/portfolio/web/node_modules
|-> 320.3 MB > /hume/user/my_code/fun_project/node_modules
|-> 298.1 MB > /hume/user/my_code/simple_game/version_2/node_modules
```
Raw data
{
"_id": null,
"home_page": "https://github.com/gregorybchris/dirsum",
"name": "dirsum",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<3.13",
"maintainer_email": "",
"keywords": "directory,file,summary",
"author": "Chris Gregory",
"author_email": "christopher.b.gregory@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/10/a9/f7912f3ce6d113772a3325267d07958a25d1dbd1cadf32749b6c3f3f2103/dirsum-0.1.0.tar.gz",
"platform": null,
"description": "# DirSum\n\nSummarize a directory recursively by file size. This tool can be used to quickly search a drive for large files taking up too much space.\n\n## Installation\n\nInstall the current PyPI release:\n\n```bash\npip install dirsum\n```\n\n## Usage\n\n```bash\n# Run the tree command to summarize a directory\n$ dirsum tree <root-dir>\n\n# Specify the minimum file size (default is 10MB)\n$ dirsum tree <root-dir> --size 750MB\n$ dirsum tree <root-dir> --size 50KB\n\n# Print full absolute paths to directories instead of directory names\n$ dirsum tree <root-dir> --absolute\n```\n\n```bash\n# Run the list command to find all directories with a matching name\n$ dirsum list <root-dir> <dir-name>\n\n# Specify the minimum file size (default is 10MB)\n$ dirsum list <root-dir> <dir-name> --size 750MB\n$ dirsum list <root-dir> <dir-name> --size 50KB\n```\n\n## Examples\n\n### Tree\n\n```bash\n# Summarize the /home/user/my_documents directory\n# showing only directories greater than 20MB in size\n$ dirsum tree /home/user/my_documents --size 20MB\n```\n\n```python\n|-> 69.0 GB > my_documents\n |-> 67.8 GB > movies\n |-> 62.0 GB > from_the_internet\n |-> 5.8 GB > home_movies\n |-> 638.1 MB > photos\n |-> 368.2 MB > rock_concert\n |-> 251.6 MB > vacation_2019\n |-> 18.4 MB > family_photos\n |-> 521.6 MB > work\n |-> 263.8 MB > boring_docs\n |-> 257.7 MB > reports\n |-> 22.5 MB > games\n```\n\n### List\n\n```bash\n# List all node_modules folders under the /home/user/my_code directory\n$ dirsum list ~/Documents/Code/Projects/Current node_modules\n```\n\n```python\n |-> 419.6 MB > /hume/user/my_code/portfolio/web/node_modules\n |-> 320.3 MB > /hume/user/my_code/fun_project/node_modules\n |-> 298.1 MB > /hume/user/my_code/simple_game/version_2/node_modules\n```\n",
"bugtrack_url": null,
"license": "Apache Software License",
"summary": "Directory summary tool.",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/gregorybchris/dirsum",
"Repository": "https://github.com/gregorybchris/dirsum"
},
"split_keywords": [
"directory",
"file",
"summary"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "77d404fb97754bcb03e61e5071cef69fba9c5f4bd8090a0b1c4c5306436ef47e",
"md5": "6c873de24d533280194ffe58aff5703d",
"sha256": "31ab2a03244af905d9f8acd3b337ca6cff66e0de42391b6fedf3c0f86ea1a7d9"
},
"downloads": -1,
"filename": "dirsum-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6c873de24d533280194ffe58aff5703d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<3.13",
"size": 9093,
"upload_time": "2023-11-12T02:10:34",
"upload_time_iso_8601": "2023-11-12T02:10:34.844305Z",
"url": "https://files.pythonhosted.org/packages/77/d4/04fb97754bcb03e61e5071cef69fba9c5f4bd8090a0b1c4c5306436ef47e/dirsum-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "10a9f7912f3ce6d113772a3325267d07958a25d1dbd1cadf32749b6c3f3f2103",
"md5": "60875369532fe01dcfbb315891497786",
"sha256": "32f4a66fb7e5103677a07bc690c5f2a2cbf40ecf51540533b55da8c8a7e7adc5"
},
"downloads": -1,
"filename": "dirsum-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "60875369532fe01dcfbb315891497786",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<3.13",
"size": 8114,
"upload_time": "2023-11-12T02:10:36",
"upload_time_iso_8601": "2023-11-12T02:10:36.568931Z",
"url": "https://files.pythonhosted.org/packages/10/a9/f7912f3ce6d113772a3325267d07958a25d1dbd1cadf32749b6c3f3f2103/dirsum-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-12 02:10:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gregorybchris",
"github_project": "dirsum",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "dirsum"
}