lff-cr v0.1.1

Simple and straightforward large files finder utility

lff-cr

License: MIT Built with Crystal Build Status Latest release lff

Simple and straightforward large files finder utility for *nix, optimize for human.

Why?

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

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!

NOTE: Benchmarking is run on MBP2018 13" OSX 10.15.4.

Installation

MacOS

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

Build from source

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

Usage

# lff <directory-path>
lff ~/Downloads
# or simple `lff` only to run at current directory.

Contributing

  1. Fork it (https://github.com/mkdika/lff-cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Copyright and License

Copyright 2020 - 2021 Maikel Chandika (mkdika@gmail.com). Code released under the MIT License. See LICENSE file.

Repository

lff-cr

Owner
Statistic
  • 18
  • 0
  • 0
  • 0
  • 0
  • over 3 years ago
  • May 2, 2020
License

MIT License

Links
Synced at

Sun, 24 Nov 2024 12:31:54 GMT

Languages