{"id":17526921,"url":"https://github.com/nicciniamh/spacehog","last_synced_at":"2026-05-20T05:39:34.744Z","repository":{"id":188774071,"uuid":"264101587","full_name":"nicciniamh/spacehog","owner":"nicciniamh","description":"Python script to find top diskspace hogs","archived":false,"fork":false,"pushed_at":"2020-06-11T05:16:08.000Z","size":2405,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-10-20T22:03:38.324Z","etag":null,"topics":["cli","disk-management","macos","python3","systemadm","unix"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicciniamh.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-05-15T05:11:27.000Z","updated_at":"2023-02-17T01:17:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"2679b3a6-b867-4433-86e6-2acb34056005","html_url":"https://github.com/nicciniamh/spacehog","commit_stats":null,"previous_names":["nicciniamh/spacehog"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/nicciniamh/spacehog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicciniamh%2Fspacehog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicciniamh%2Fspacehog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicciniamh%2Fspacehog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicciniamh%2Fspacehog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicciniamh","download_url":"https://codeload.github.com/nicciniamh/spacehog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicciniamh%2Fspacehog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267875777,"owners_count":24158782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","disk-management","macos","python3","systemadm","unix"],"created_at":"2024-10-20T15:02:37.801Z","updated_at":"2026-05-20T05:39:29.713Z","avatar_url":"https://github.com/nicciniamh.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\n\u003cimg src=\"logo.png\" style=\"height: 333; width: 640\"\u003e\n# Spacehog\nPython Script to find disk space 'hogs'\n\n## Requirements\n* Python3\n* *psutils (pip3 install psutils)\n\n\n## Installation\nTo install follow these steps:\n\n      git clone https://github.com/nicciniamh/spacehog.git\n      cp spacehog/spacehog ~/bin # or other directory on PATH\n      chmod 755 ~bin/spacehog\n      cp spacehog.ini ~/bin # This file must be present.\n      pip3 install psutils\n\n## Usage\n\n *spacehog* [-h] [--config] [--count number] [--ignore filename][--mounted] [--showfs] [--output filename] [--quiet] [dir] ... \n \n### Program arguments\n\n*--config* Full path to a different ini file.\n\n*--count*  number of directories to display (may be less if there arent that many)\n\n*--ignore* file with list of regular expressions (or plain text) of paths to ignore\n \t\t\n*--mounted* scan mounted filesystems. Default is to not traverse mounted file systems.\n\n*--output* filename. Write report to *filename*, implies --quiet as well.\n\n*--quiet* prevents scanning status messages.\n\n*--showfs* Show filesystem information. \n\n*dir ..* one or more directories to scan. If not specified, current workng directory is used.\n\n# Description\n*Spacehog* attempts to located files and directories under *dir* and calculate, based on file size, the usage and reports the top *count* directories. Multiple directories may be specified.\n\nTo create a report, use the --output file.ext option to write a report to file.ext. Reports are written with a timestamp in the banner.\n\nTo include filesystem information (free space, total space and percent free) use the --showfs option.  \n\nThis program is generally pretty quick depending on disk type and processor speed. \n\n## Excluding Directories\nBy default, *spacehog* looks for a file called .spacehog.ignore which is one or more lines of regular expressions, representing directories to exclude. To override this file, specify --ignore and the path of the ignore list. This file is either an absolute path or relative to the path being examined. If '--ignore none' is used, no ignore list will be used and all directories will be examined.\n\n## Mounted File Systems\nBy default, *spacehog* will not traverse mounted filesystems. This is done using *os.path.ismount* and may fail on some systems (notably *MacOS* where some Volumes do not appear as mounts). To force *spacehog* to follow these mounts, use the --mounted flag. This may or may not work with *NTFS* (Friends don't let friends use NTFS) volume mounted on a particular directory. \n\n## Quiet Mode\nBy default, *spacehog* displays it's progress/status when scanning directories. To prevent this, use gthe --quiet option. This is useful if you want a report generrated. \n\n## Customizing\nThe file, spacehog.ini, contains message texts and tokens to be replaced at runtime. These texts can be changed to customize the texts or even change to another language.\n\n\n## Examples\n`spacehog --count=5 ~/Code` counts the top five directories in *~/Code*\n\n`spacehog --count=20 --output=~/top20,txt /home/nicci` Produces a report of the top 20 disk hogs in */home/nicci*\n\n`spacehog --ignore /home/nicci/ignorethese.txt /usr` Counts the top 10 disk consumers in /usr, ignoring paths in */home/nicci/ignorethese.txt*\n\n### Sample Output\n\n      Report Run: 06:43, 21 May, 2020\n      Top 10 Directories in /Volumes/Extra/Users/nicci\n      --- -- ----------- -- --------------------------\n\n         Size Path\n      ------- --------------\n      325.3Gb Pictures\n       36.4Gb VirtualBox VMs\n       19.5Gb Library\n       12.9Gb Downloads\n       10.2Gb pdbak\n        1.4Gb Dropbox\n        1.2Gb Music\n        1.2Gb Tools\n      489.7Mb DAW\n      449.1Mb Documents\n\n\t409.1Gb bytes in 10 directories (3855 files)\n\n      File System Information\n      ---- ------ -----------\n\n      \t/dev/disk1s4:\t156.3Gb bytes total, 45.2Gb bytes free (28% free)\n\t\tdir(s): /Volumes/Extra/Users/nicci\n\nCopyright \u0026copy; 2020 Nicole Stevens. Code may be freely used. Please keep my copyright intact. \n\nFor license see LICENSE. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicciniamh%2Fspacehog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicciniamh%2Fspacehog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicciniamh%2Fspacehog/lists"}