Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/techjacker/filecleaner
CLI tool that recursively removes large assets from a directory written in Go
https://github.com/techjacker/filecleaner
Last synced: 12 days ago
JSON representation
CLI tool that recursively removes large assets from a directory written in Go
- Host: GitHub
- URL: https://github.com/techjacker/filecleaner
- Owner: techjacker
- License: mit
- Created: 2014-07-04T20:28:25.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-04T20:52:12.000Z (over 10 years ago)
- Last Synced: 2024-12-17T04:43:18.052Z (2 months ago)
- Language: Go
- Homepage:
- Size: 1010 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# filecleaner
Clean a directory recursively of large assets:
(png|css|jpg|JPG|gif|GIF|doc|DOC|pdf|PDF|mov|mp4|mpg|wmv|3gp|swf|SWF|eot|svg|ttf|woff)
Installation
------------```shell
go get github.com/techjacker/filecleaner
go install github.com/techjacker/filecleaner
```Usage
-----```shell
$ filecleanerCleaning dir: (/private/var/folders/2t/srny64c16n7836cdzv7zwv2m0000gp/T/filecleaner)
Success!
Before: 748 kb
Removed: 420 kb
Remaining: 328 kb
Deleted: 8 files
```Tests
-----------------------------------------------------```shell
go test
```Find biggest files in dir + add to file removal regex
-----------------------------------------------------```shell
find . -type f -size +1M -exec du {} \; | sort -n
```