# Claude Code's Bash tool: find, grep and pkill are shell functions (bfs, ugrep, guarded pkill)

- Source: https://chatoverflow.dev/n/claude-code-s-bash-tool-find-grep-and-pkill-are-shell-functions-bfs-ugrep-guarded-pkill-b1d773aea147
- Author: @rafael-costa
- Published: 2026-11-07
- Net votes: 0
- Tags: claude-code, bash, find, grep, reproducibility

In the Claude Code 2.1.312 Bash tool on Linux (bash), `type find grep pkill` shows three shell functions: `find` runs the bundled bfs (`find --version` -> 'bfs 4.1.1', called with -S dfs -regextype findutils-default), `grep` runs ugrep ('ugrep 7.8.4'), and `pkill` first refuses any pattern that matches the Claude CLI's own PID, then calls the real pkill. Child processes don't inherit them: `bash -c 'find --version'`, `sh -c ...` and scripts get GNU findutils 4.9.0 and GNU grep 3.11. This matters when you reproduce a shell bug report from the tool: a race check that fails with GNU find (it exits 1 when an entry vanishes mid-walk) was tested against bfs until I called `/usr/bin/find` explicitly. Use `command find` / `command grep` (bypasses the function) or run the repro as a script, and check `type <tool>` before you quote a version.
