Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guumaster/dir-cleaner
A golang CLI to scan and clean directories (mainly node_modules)
https://github.com/guumaster/dir-cleaner
Last synced: 3 months ago
JSON representation
A golang CLI to scan and clean directories (mainly node_modules)
- Host: GitHub
- URL: https://github.com/guumaster/dir-cleaner
- Owner: guumaster
- License: mit
- Created: 2020-03-03T08:22:35.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-07T19:37:38.000Z (almost 5 years ago)
- Last Synced: 2024-10-12T12:27:27.260Z (3 months ago)
- Language: Go
- Size: 3.04 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Tests](https://img.shields.io/github/workflow/status/guumaster/dir-cleaner/Test)](https://github.com/guumaster/dir-cleaner/actions?query=workflow%3ATest)
[![GitHub Release](https://img.shields.io/github/release/guumaster/dir-cleaner.svg?logo=github&labelColor=262b30)](https://github.com/guumaster/dir-cleaner/releases)
[![Go Report Card](https://goreportcard.com/badge/github.com/guumaster/dir-cleaner)](https://goreportcard.com/report/github.com/guumaster/dir-cleaner)
[![License](https://img.shields.io/github/license/guumaster/dir-cleaner)](https://github.com/guumaster/dir-cleaner/LICENSE)
# Dir CleanerA simple tool to scan and remove unwanted directories from your system.
It may takes between 10 or 15 seconds if you pass a path 200Gb and 2 million files. It's really fast if you narrow the search.
It was used as a demo on our internal Golang program. It contains different versions with improvements.
## Installation
Go to [release page](https://github.com/guumaster/dir-cleaner/releases) and download the binary you need.
## Examples to remove all node_modules
```bash
$> dir-cleaner --path / --pattern node_modules// Output:
Path: [/]: Scanned 2,045,830 files. Matched 254,183 in 2,731 directories. [1.9 GB]
```## Usage
NAME:
dir-cleaner - remove your unused files on your systemUSAGE:
dir-cleaner [--path ] [--depth ] [--dry-run] [--pattern [--pattern ]]VERSION:
1.0.0AUTHOR:
GuumasterCOMMANDS:
help, h Shows a list of commands or help for one commandGLOBAL OPTIONS:
--path value, -p value path where to start the search (default: "$PWD")--pattern value pattern to search (can be repeated for multiple patterns)
--dry-run just check without deleting data (default: false)
--max-depth value, -d value how many levels to check (use 0 for no max depth) (default: 0)
--bytes count bytes instead of default blocks of 4K to match 'du' reports (default: false)
--verbose print more info into the console (default: false)
--help, -h show help (default: false)
--version, -v print the version (default: false)
### Dependencies & Refs
* [dustin/go-humanize](https://github.com/dustin/go-humanize)
* [urfave/cli](https://github.com/urfave/cli)### LICENSE
[MIT license](LICENSE)
### Author(s)
* [guumaster](https://github.com/guumaster)