{"id":13446768,"url":"https://github.com/aleksaan/diskusage","last_synced_at":"2025-12-15T03:59:27.134Z","repository":{"id":31228940,"uuid":"127282423","full_name":"aleksaan/diskusage","owner":"aleksaan","description":"Duck is a very fast utility to find largest directories or files","archived":false,"fork":false,"pushed_at":"2022-09-07T16:11:01.000Z","size":25166,"stargazers_count":98,"open_issues_count":4,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-28T11:43:28.896Z","etag":null,"topics":["analyzes","biggest","command-line","command-line-tool","depth","directories","disk","disk-space","disk-usage","diskusage","files","folder","folders","largest","size","top","usage","utility"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aleksaan.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}},"created_at":"2018-03-29T11:32:49.000Z","updated_at":"2024-09-13T21:01:08.000Z","dependencies_parsed_at":"2022-08-08T06:00:14.839Z","dependency_job_id":null,"html_url":"https://github.com/aleksaan/diskusage","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleksaan%2Fdiskusage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleksaan%2Fdiskusage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleksaan%2Fdiskusage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleksaan%2Fdiskusage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleksaan","download_url":"https://codeload.github.com/aleksaan/diskusage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244829612,"owners_count":20517342,"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":["analyzes","biggest","command-line","command-line-tool","depth","directories","disk","disk-space","disk-usage","diskusage","files","folder","folders","largest","size","top","usage","utility"],"created_at":"2024-07-31T05:00:59.360Z","updated_at":"2025-12-15T03:59:27.056Z","avatar_url":"https://github.com/aleksaan.png","language":"Go","readme":"# DUCK - (D)isk(U)sage(CK) \nDuck is a very fast utility to find largest directories or files\n\u003cbr\u003e\u003cimg src=\"./img/duck.jpg\" width=\"200\"\u003e\u003cbr\u003e\nIllustrator: Ekaterina [[t.me/@kateUV](https://t.me/kateUV)]\n\n## To Elon Musk\nI hope you will see it and I have couple of quite well ideas to chat them with you.\n\nWrite to [[t.me/@AngryMuscle](https://t.me/AngryMuscle)]\n\n## Features\n- Gathers directories/files sizes\n- Finds top of largest directories/files\n- Very fast\n- JSON compatible (for a service using)\n- Human readable mode of output (for a console using)\n- More accuracy than FAR manager\n\n## Releases\nReleases available as single executable files – just [download latest release](https://github.com/aleksaan/diskusage/releases) for your platform, unpack and run.\n\n## How it works\nSince version **2.8.0** utility has a two parts:\n- ```Duck_a``` duck says **analyse**\n- ```Duck_f``` duck says **find**\n\n```Duck_a``` gathers sizes of all directories and files under specific path.\n```Duck_f``` takes results of ```Duck_a``` and looks for top of largest objects among them.\n\nYou can scanning 1Tb disk only once by ```Duck_a``` (*some minutes*) and then many times finds largest objects by ```Duck_f``` with different parameters (*some milliseconds*).\n\n## ```Duck_a``` utility\n\n```Duck_a``` calculates sizes of directories and files. \n\n**Parameters**:\n- ```-path=c:\\temp``` - starting point to analyse\n- ```-hr``` - human readable results representation (text format), if omit that means JSON format\n- ```-hrrows``` - how many rows will be printed in a human readable mode (default - 50)\n\nBy default program outputs results to ```console```.\n\n**Example a.1**. Scanning  from c:\\temp and saving results in JSON format to ```results_a.txt```\n   \n```duck_a.exe -path c:\\temp\\ \u003e .\\results_a.txt```\n\n**Example a.2**. Scanning from c:\\temp and output results in human readable format to ```console```\n   \n```duck_a.exe -path c:\\temp\\ -hr``` \n\n## ```Duck_f``` utility\n\n```Duck_f``` takes results of ```Duck_a```, iterates over them and finds top largest directories or files\n\n**Parameters**:\n- ```-top=20``` - how much directories or files will be founded\n- ```-depth=2``` - depth of analysis inside of results ```Duck_a```\n- ```-filter=df``` - filter by objects types (```f``` - files only, ```d``` - directories only, ```df``` - both of them)\n- ```-size=c``` - method of calculating directories size (```c``` clean size (excludes sizes of subdirectories) or ```f``` - full size (inludes subdirectories))\n- ```-path=abc``` - not the same what this parameters means in ```duck_a```. It's a filter by part of the path (will be outputed all rows which path includes this one)\n- ```-hr``` - human readable results representation (text format), if omit that will be JSON format\n\nBy default program outputs results to ```console```.\n\n**Example f.1**. Searching top-10 largest directories or files on depth 2 and outputing results as JSON to file\n   \n```duck_f.exe -depth=2 -size=c -top=10 -filter=df \u003c .\\results_a.txt \u003e .\\results_f.txt```\n\n**Example f.2**. Searching top-12 largest directories or files on depth 3 and outputing results in human readable format to ```console```\n   \n```duck_f.exe -depth=3 -size=c -top=12 -filter=d -hr \u003c .\\results_a.txt```\n\n**Example f.3**. Like as ```Example f.2``` but with filtering by path of file (for example, print only dir or files contains `.git` in their path \u0026 names)\n                                                                         \n```duck_f.exe -depth=2 -size=c -top=12 -filter=d -path=.git -hr \u003c .\\results_a.txt```\n\n**So there are results of Example f.3**\n```-------------------\nArguments:\n   filter:    d\n   depth:     3\n   top:       12\n   hr:        true\n   size:      c\n-------------------\nResults:\n     1.| PATH:   diskusage\\.git\\hooks     | FULL SIZE:    22.89 Kb   | CLEAN SIZE:    22.89 Kb   | DEPTH: 3\n     2.| PATH:   statusek\\.git\\hooks      | FULL SIZE:    22.89 Kb   | CLEAN SIZE:    22.89 Kb   | DEPTH: 3\n     3.| PATH:   statusek\\.git            | FULL SIZE:   114.22 Mb   | CLEAN SIZE:     5.22 Kb   | DEPTH: 2\n     4.| PATH:   diskusage\\.git           | FULL SIZE:    22.67 Mb   | CLEAN SIZE:     5.08 Kb   | DEPTH: 2\n     5.| PATH:   statusek\\.git\\logs       | FULL SIZE:     5.30 Kb   | CLEAN SIZE:     2.17 Kb   | DEPTH: 3\n     6.| PATH:   diskusage\\.git\\logs      | FULL SIZE:     1.79 Kb   | CLEAN SIZE:   741.00 b    | DEPTH: 3\n     7.| PATH:   diskusage\\.git\\info      | FULL SIZE:   240.00 b    | CLEAN SIZE:   240.00 b    | DEPTH: 3\n     8.| PATH:   statusek\\.git\\info       | FULL SIZE:   240.00 b    | CLEAN SIZE:   240.00 b    | DEPTH: 3\n     9.| PATH:   diskusage\\.git\\objects   | FULL SIZE:    22.64 Mb   | CLEAN SIZE:     0.00 b    | DEPTH: 3\n    10.| PATH:   diskusage\\.git\\refs      | FULL SIZE:   155.00 b    | CLEAN SIZE:     0.00 b    | DEPTH: 3\n    11.| PATH:   statusek\\.git\\objects    | FULL SIZE:   114.19 Mb   | CLEAN SIZE:     0.00 b    | DEPTH: 3\n    12.| PATH:   statusek\\.git\\refs       | FULL SIZE:   196.00 b    | CLEAN SIZE:     0.00 b    | DEPTH: 3\n  ```\n* How you can see results are sorted by ```CLEAN SIZE``` (not included sizes of subdirectories). ```FULL SIZE``` is not sorted and not the same as ```CLEAN SIZE```.\n\n**Note about ```FULL SIZE``` and ```CLEAN SIZE```**\n   \nFor example, if you have directories:\n- ```A (100Mb)\\B (70Mb)\\C (60Mb)```\n\nthen ```CLEAN SIZE``` of these dirs will be:\n- ```A``` - ```30Mb``` (excluded size of ```B```)\n- ```B``` - ```10Mb``` (excluded size of ```C```)\n- ```C``` - ```60Mb``` (the same as ```FULL SIZE``` because no any subdirs inside)\n\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleksaan%2Fdiskusage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleksaan%2Fdiskusage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleksaan%2Fdiskusage/lists"}