lff
lff-cr
Simple and straightforward large files finder utility for *nix, optimize for human, written in Crystal language.
Why?
There are workarounds to do it on *nix, using combination of find
, du
, sort
, head
eg:
find /your/directory -xdev -type f -exec du -sh {} ';' | sort -rh | head -n10
# will printout the top 10 largest files size within given directory
But I'm to lazy to memorize them all :sweat_smile: so I need the simplest solution instead!
# my way
lff /your/directory
Benchmark
I simple benchmarking with time
, with searching the top largest files within moderate Java project directory and about 11.901 files:
# with: find, du, sort, head
find /my/project/directory -xdev -type f -exec du -sh {} ';' 6.63s user 14.03s system 85% cpu 24.131 total
sort -rh 0.08s user 0.07s system 0% cpu 24.145 total
head -n10 0.00s user 0.00s system 0% cpu 24.141 total
# with: lff
./lff /my/project/directory 0.05s user 0.25s system 92% cpu 0.328 total
It is faster!
Installation
Linux
Coming soon..
MacOS
Coming soon..
Build from source
Install Crystal language and its pre requirement.
git clone https://github.com/mkdika/lff-cr.git
cd lff-cr/
shards build --production --release
The built binary will be available as ./bin/lff
Contributing
- Fork it (https://github.com/mkdika/lff-cr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Maikel Chandika - creator and maintainer
Copyright and License
Copyright 2020 Maikel Chandika (mkdika@gmail.com). Code released under the MIT License. See LICENSE file.