
Show HN: Libnicko - C library to identify popular file types as fast as possible - bindh3x
https://github.com/bindh3x/libnicko
======
jwilk
So is it actually faster than file(1)? How much? It's weird that the speed is
being advertised as the primary feature, but there's no benchmark.

BTW, file(1) has the -e/\--exclude option, which can speed it up a bit.

~~~
bindh3x
When I initially developed this tool it was because I wanted something faster
then file(1). Now it's a library with Tcl binding and soon Python.

I guess advertising it as a faster tool was a mistake, but the concept of
nicko (groups, short output) is good for scripting. it's fast and simple and
the library is portable across unices.

Anyway thanks for the feedback!.

If you want to quickly measure (file-nicko):

$ time file -e elf /usr/bin/*

$ time nicko /usr/bin/*

On my system:

file(1):

real 0m1.254s user 0m1.049s sys 0m0.184s

nicko(1):

real 0m0.028s user 0m0.010s sys 0m0.014s.

