A fast, structured command-line utility designed for disk space analysis and storage reclamation on macOS and Linux systems.
Storage management tools on Unix-like platforms typically force a trade-off between speed, legibility, and granularity:
du require complex piping (e.g., du -sh * | sort -hr) to order results, lack real-time feedback during large tree traversals, and fail abruptly on permission-restricted paths unless explicitly suppressed.ncdu) require full indexation passes before presenting interactive state and are not inherently optimized for scriptable, automated text reporting.macfilesizing provides an immediate, deterministic solution: it traverses directories recursively or at the top level, dynamically computes entity weights, handles system-level permission barriers gracefully, and outputs items in strict descending order with standardized human-readable units.
--tree) to detect deeply nested build caches and orphaned data.tqdm to maintain visibility over high-latency I/O operations.--report) designed for headless servers, backup verification, and automated maintenance workflows.For macOS systems, installation via Homebrew is the supported method:
brew tap jaccon/tap
brew install macfilesizing
This provisions macfilesizing directly into your system $PATH within an isolated execution environment.
Install the package directly from GitHub via pip:
pip install git+https://github.com/jaccon/macfilesizing.git
For local development or environments without package managers:
git clone https://github.com/jaccon/macfilesizing.git
cd macfilesizing
pip install -r requirements.txt
chmod +x macFileSizing.py
macfilesizing --source <directory_path> [options]
| Flag | Type | Required | Description |
|---|---|---|---|
--source | String | Yes | Root directory path to evaluate (., ~, or an absolute path). |
--tree | Flag | No | Enables recursive scanning of all subdirectories and files. |
--report | String | No | Destination file path to write a persistent text audit. |
Evaluates the direct children of the specified path:
macfilesizing --source ~/Downloads
Sample output:
Analyzing directory: /Users/username/Downloads
Please wait, calculating sizes...
Type Size Name
--------------------------------------------------------------------------------
DIR 4.12 GB Xcode_Old_Simulators
FILE 1.45 GB ubuntu-24.04-desktop-amd64.iso
DIR 650.30 MB raw_footage
FILE 210.15 MB archive.tar.gz
FILE 45.10 MB dataset.csv
--------------------------------------------------------------------------------
Total: 6.47 GB
Items found: 5
Perform a full tree traversal of development workspaces and output the summary to a persistent file:
macfilesizing --source ~/Projects --tree --report ~/storage_audit.txt
Target system directories requiring elevated privileges:
sudo macfilesizing --source /var/log --tree --report /var/log/disk_usage_summary.txt
Configure weekly disk space monitoring for multi-user or build server environments:
0 2 * * 0 /usr/local/bin/macfilesizing --source /home --tree --report /var/log/audit/disk_$(date +\%Y\%m\%d).log
Standard output is formatted into fixed-width columns:
Type: Indicates entry type (DIR for directories, FILE for individual files).Size: Dynamic byte conversion using standard binary multiples (B, KB, MB, GB, TB, PB).Name / Path: Entry identifier (relative path when invoked with --tree).Total: Aggregate disk space consumed by all listed entries.Items found: Cardinality of all cataloged filesystem nodes.Reports generated via --report prepend execution metadata and timestamps, facilitating diffing across multiple audit cycles:
File Sizing Report
Generated: 2026-09-13 10:15:30
================================================================================
Analyzing directory: /Users/username/Documents
Mode: Recursive (tree mode)
Type Size Path
--------------------------------------------------------------------------------
DIR 2.45 GB Projects/legacy-client-portal
FILE 856.32 MB Presentations/annual-summit.pdf
DIR 543.21 MB Databases/local-mysql-dump
FILE 234.56 MB Archives/contracts-2024.zip
--------------------------------------------------------------------------------
Total: 4.08 GB
Items found: 842
tqdm (console rendering and progress metrics).| Condition | Cause | Resolution |
|---|---|---|
Permission denied | Insufficient process permissions on protected paths. | The scanner bypasses restricted files automatically. Run with sudo if inspection of system-owned paths is required. |
ModuleNotFoundError: No module named 'tqdm' | Missing Python runtime dependency. | Execute pip install tqdm or re-install through Homebrew. |
| High CPU/IO Latency | Deep traversal across broad filesystems (e.g., /). | Target specific directories (~/Library, ~/Projects, /var) rather than the filesystem root, or perform a shallow scan prior to deep traversal. |
| Report write failure | Target directory does not exist or lacks write permissions. | Verify file path validity and user permissions for the destination directory. |
git checkout -b feature/improvement).git commit -m 'Implement path filtering').git push origin feature/improvement).This project is licensed under the MIT License. See the LICENSE file for details.
Developed by Jaccon (GitHub).
1 commits
HTML
87.7%
Python
11.0%
Ruby
1.3%
A fast, structured command-line utility designed for disk space analysis and storage reclamation on macOS and Linux systems.
Storage management tools on Unix-like platforms typically force a trade-off between speed, legibility, and granularity:
du require complex piping (e.g., du -sh * | sort -hr) to order results, lack real-time feedback during large tree traversals, and fail abruptly on permission-restricted paths unless explicitly suppressed.ncdu) require full indexation passes before presenting interactive state and are not inherently optimized for scriptable, automated text reporting.macfilesizing provides an immediate, deterministic solution: it traverses directories recursively or at the top level, dynamically computes entity weights, handles system-level permission barriers gracefully, and outputs items in strict descending order with standardized human-readable units.
--tree) to detect deeply nested build caches and orphaned data.tqdm to maintain visibility over high-latency I/O operations.--report) designed for headless servers, backup verification, and automated maintenance workflows.For macOS systems, installation via Homebrew is the supported method:
brew tap jaccon/tap
brew install macfilesizing
This provisions macfilesizing directly into your system $PATH within an isolated execution environment.
Install the package directly from GitHub via pip:
pip install git+https://github.com/jaccon/macfilesizing.git
For local development or environments without package managers:
git clone https://github.com/jaccon/macfilesizing.git
cd macfilesizing
pip install -r requirements.txt
chmod +x macFileSizing.py
macfilesizing --source <directory_path> [options]
| Flag | Type | Required | Description |
|---|---|---|---|
--source | String | Yes | Root directory path to evaluate (., ~, or an absolute path). |
--tree | Flag | No | Enables recursive scanning of all subdirectories and files. |
--report | String | No | Destination file path to write a persistent text audit. |
Evaluates the direct children of the specified path:
macfilesizing --source ~/Downloads
Sample output:
Analyzing directory: /Users/username/Downloads
Please wait, calculating sizes...
Type Size Name
--------------------------------------------------------------------------------
DIR 4.12 GB Xcode_Old_Simulators
FILE 1.45 GB ubuntu-24.04-desktop-amd64.iso
DIR 650.30 MB raw_footage
FILE 210.15 MB archive.tar.gz
FILE 45.10 MB dataset.csv
--------------------------------------------------------------------------------
Total: 6.47 GB
Items found: 5
Perform a full tree traversal of development workspaces and output the summary to a persistent file:
macfilesizing --source ~/Projects --tree --report ~/storage_audit.txt
Target system directories requiring elevated privileges:
sudo macfilesizing --source /var/log --tree --report /var/log/disk_usage_summary.txt
Configure weekly disk space monitoring for multi-user or build server environments:
0 2 * * 0 /usr/local/bin/macfilesizing --source /home --tree --report /var/log/audit/disk_$(date +\%Y\%m\%d).log
Standard output is formatted into fixed-width columns:
Type: Indicates entry type (DIR for directories, FILE for individual files).Size: Dynamic byte conversion using standard binary multiples (B, KB, MB, GB, TB, PB).Name / Path: Entry identifier (relative path when invoked with --tree).Total: Aggregate disk space consumed by all listed entries.Items found: Cardinality of all cataloged filesystem nodes.Reports generated via --report prepend execution metadata and timestamps, facilitating diffing across multiple audit cycles:
File Sizing Report
Generated: 2026-09-13 10:15:30
================================================================================
Analyzing directory: /Users/username/Documents
Mode: Recursive (tree mode)
Type Size Path
--------------------------------------------------------------------------------
DIR 2.45 GB Projects/legacy-client-portal
FILE 856.32 MB Presentations/annual-summit.pdf
DIR 543.21 MB Databases/local-mysql-dump
FILE 234.56 MB Archives/contracts-2024.zip
--------------------------------------------------------------------------------
Total: 4.08 GB
Items found: 842
tqdm (console rendering and progress metrics).| Condition | Cause | Resolution |
|---|---|---|
Permission denied | Insufficient process permissions on protected paths. | The scanner bypasses restricted files automatically. Run with sudo if inspection of system-owned paths is required. |
ModuleNotFoundError: No module named 'tqdm' | Missing Python runtime dependency. | Execute pip install tqdm or re-install through Homebrew. |
| High CPU/IO Latency | Deep traversal across broad filesystems (e.g., /). | Target specific directories (~/Library, ~/Projects, /var) rather than the filesystem root, or perform a shallow scan prior to deep traversal. |
| Report write failure | Target directory does not exist or lacks write permissions. | Verify file path validity and user permissions for the destination directory. |
git checkout -b feature/improvement).git commit -m 'Implement path filtering').git push origin feature/improvement).This project is licensed under the MIT License. See the LICENSE file for details.
Developed by Jaccon (GitHub).
1 commits
HTML
87.7%
Python
11.0%
Ruby
1.3%