Breadth-first variant of the UNIX find command with improved usability and helpful error messages
bfs is a file search tool that reimplements the UNIX find command using breadth-first search instead of depth-first traversal. This approach typically finds target files faster by exploring directories level by level, avoiding deep dives into irrelevant subdirectories before finding matches in shallow locations. The tool maintains compatibility with POSIX, GNU, and BSD versions of find while adding usability improvements.
Unlike traditional find implementations, bfs accepts command-line arguments in flexible order and provides helpful error detection with typo correction suggestions. It includes static analysis to warn about potentially incorrect expressions and offers enhanced operators like -exclude for skipping entire subtrees and -nohidden for ignoring hidden files. These extensions simplify common search patterns that require complex syntax in standard find.
The tool is designed for system administrators, developers, and power users who frequently search filesystems and want faster results with better error handling. It supports the same predicates, actions, and expressions as standard find implementations, making it a drop-in replacement for existing scripts and workflows.
# via Homebrew
brew install bfs
# via APT
apt install bfs
# via DNF
dnf install bfs