Simple and straightforward large files finder utility for *nix, optimize for human.
There are workarounds about how to do it on *nix, for instance is using combination of find
, du
, sort
, head
.
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 😅 I need a simpler solution instead!
# my way
lff /your/directory
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!
NOTE: Benchmarking is run on MBP2018 13" OSX 10.15.4.
brew tap mkdika/brew
brew install lff
Linux via snap
For more on installing & using snap
with your Linux distribution, see the official documentation.
snap install lff
Install Crystal language.
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
# lff <directory-path>
lff ~/Downloads
# or simple `lff` only to run at current directory.
- 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
- Maikel Chandika - creator and maintainer
Copyright 2020 - 2021 Maikel Chandika (mkdika@gmail.com). Code released under the MIT License. See LICENSE file.