If you do a significant amount of programming, you'll probably end up with
build artifacts scattered about. sniff
is a tool to help you find those
artifacts. It's especially useful when you're writing build systems,
because you can make sure your clean
command gets everything.
Anecdotally, I found around 2GB of junk with this tool.
The easiest way to install for Linux or Windows is to download a binary from the releases page.
If your platform doesn't have binaries, get cargo. Then:
bash
$ cargo install file-sniffer
If you want the absolute latest version:
bash
$ cargo install --git https://github.com/vmchale/file-sniffer
Make sure you are on nightly; if in doubt run
bash
rustup run nightly cargo install file-sniffer
Currently, sniff
looks for files that either have an extension associated with artifacts
or executable files listed in the relevant .gitignore
.
Search current directory for directories with build artifacts:
bash
$ sniff ar
Look in $DIR
for build artifacts and sort by size:
bash
$ sniff ar $DIR --sort
Look for artifacts or directories containing artifacts that occupy more than 1GB of disk space:
bash
$ sniff ar -t1G
To turn off colorized output:
bash
export CLICOLOR=0
The intent is to support basically anything, so if your DOC is not on the list, feel free to open a PR or start an issue.
These still need a bit of work; as of now errors and warnings are still in English. Binaries will be available once things stabilize.
Français:
bash
cargo install file-sniffer --no-default-features --feature francais # crates.io doesn't permit unicode there
Deutsch:
bash
cargo install file-sniffer --no-default-features --feature deutsch