{"id":16616745,"url":"https://github.com/stecman/btrfs-df","last_synced_at":"2025-10-29T19:31:25.947Z","repository":{"id":66224497,"uuid":"96100035","full_name":"stecman/btrfs-df","owner":"stecman","description":"List BTRFS subvolume and snapshot sizes with paths like df","archived":false,"fork":false,"pushed_at":"2024-03-17T22:22:56.000Z","size":12,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-03-17T23:23:20.753Z","etag":null,"topics":["btrfs","btrfs-progs","filesystem-utils","linux"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stecman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-07-03T10:36:59.000Z","updated_at":"2024-03-17T22:08:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"472c5dd1-ea63-49f7-be9a-de65fbf86b3f","html_url":"https://github.com/stecman/btrfs-df","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stecman%2Fbtrfs-df","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stecman%2Fbtrfs-df/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stecman%2Fbtrfs-df/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stecman%2Fbtrfs-df/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stecman","download_url":"https://codeload.github.com/stecman/btrfs-df/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219857336,"owners_count":16556068,"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","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":["btrfs","btrfs-progs","filesystem-utils","linux"],"created_at":"2024-10-12T02:14:07.044Z","updated_at":"2025-10-29T19:31:20.648Z","avatar_url":"https://github.com/stecman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BTRFS subvolume/snapshot size with paths\n\nList BTRFS subvolume space use information similar to `df -h` with paths displayed.\n\nNormally, `btrfs qgroup show` lists subvolumes, but only by id:\n\n```\n$ btrfs qgroup show /mnt/somebtrfsvol --human-readable --sort=-excl\n\nqgroupid         rfer         excl\n--------         ----         ----\n0/2317      848.55GiB     24.35GiB\n0/3217      883.62GiB     16.04GiB\n0/1998      840.20GiB     16.01GiB\n0/489       160.81GiB      8.01GiB\n0/7125      227.62GiB      2.21GiB\n0/7202      230.20GiB    982.49MiB\n```\n\nThis script saves looking up path information with `btrfs subvolume list` as paths\nare added to the output:\n\n```\n$ ./btrfs-subvolumes.py /mnt/somebtrfsvol --human-readable --sort=-excl\n\npath                                        qgroupid         rfer         excl\n----                                        --------         ----         ----\nPhotos/Photos.20160703                      0/2317      848.55GiB     24.35GiB\nPhotos/Photos.20161106                      0/3217      883.62GiB     16.04GiB\nPhotos/Photos.20160605                      0/1998      840.20GiB     16.01GiB\nArchive/Archive.20160504                    0/489       160.81GiB      8.01GiB\ntimemachine/timemachine.20170716            0/7125      227.62GiB      2.21GiB\ntimemachine/timemachine.20170723            0/7202      230.20GiB    982.49MiB\n```\n\n## Usage\n\nFor this to work on a BTRFS volume, you first need to enable quotas on the volume:\n\n```bash\nbtrfs quota enable /mnt/some-volume\n```\n\nAll arguments are passed through to `btrfs qgroup show`, so you can get started with:\n\n```bash\n./btrfs-subvolumes.py /mnt/some-volume -h\n```\n\n## Notes\n\nThe current version of this script does not allow sorting by path as it passes\nall arugments through to btrfsprogs. If you need sorting by path, either submit a PR\nor use the original version of the script [here](https://github.com/stecman/btrfs-df/commit/096f480cad6ba5c0573d9523093195a1e33f5808).\n\nThis was originally based on [a shell script that was too slow](https://github.com/agronick/btrfs-size).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstecman%2Fbtrfs-df","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstecman%2Fbtrfs-df","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstecman%2Fbtrfs-df/lists"}