BFS(1) General Commands Manual BFS(1) (NAME) bfs - (SYNOPSIS) bfs [...] [...] [...] (-H/-L/-P ) . (DESCRIPTION) bfs (breadth-first) find(1) . bfs find(1) . . . (.) . find(1) bfs . bfs \( -name '*.txt' -or -lname '*.txt' \) -and -print .txt .txt . -and : bfs \( -name '*.txt' -or -lname '*.txt' \) -print -print : bfs -name '*.txt' -or -lname '*.txt' N -N +N . -N << N>> +N << N>> . (FLAGS) -H . -L . -P (). -E ( -regextype posix-extended). -X xargs(1). -d ( -depth). -s . bfs ... | sort . -x ( -xdev). -f PATH PATH ( ). -D FLAG ( -D help ). -ON N (: 3). -O0 . -O1 . -O2 -O1 . -O3 -O2 . -O4/-Ofast . -S bfs|dfs|ids|eds . bfs (). dfs . . ids . . . -S bfs . eds . ( 0-1 1-2 2-4 4-8 ). . -S ids . -jN N (: 8). (OPERATORS) ( expression ) . \( expression \) . ! expression -not expression <>: expression . \! expression ! . expression expression expression -a expression expression -and expression <> : expression true expression false . expression -o expression expression -or expression <> : expression false expression true . expression , expression <<>>: expression expression . (SPECIAL EXPRESSIONS) -exclude expression expression . -prune -depth -mindepth . . -help --help ( ). -version --version . (OPTIONS) -color -nocolor (: -color -nocolor ). -daystart . -depth ( ). -follow ( -L). -files0-from FILE NUL ('\0') FILE . -files0-from - . -ignore_readdir_race -noignore_readdir_race bfs (: -noignore_readdir_race). -maxdepth N -mindepth N / N. -mount . -noerror . -nohidden . -noleaf GNU find. -regextype TYPE TYPE. : posix-basic POSIX (). posix-extended POSIX. ed ed(1) ( posix-basic). emacs emacs(1). grep grep(1). sed sed(1) ( posix-basic). regex(7) . -status . -unique . -L . -warn -nowarn . -xdev . -mount . (TESTS) -acl (acl(5)) . -amin [-+]N -Bmin [-+]N -cmin [-+]N -mmin [-+]N N accessed/Birthed/changed/modified (///) . -anewer FILE -Bnewer FILE -cnewer FILE -mnewer FILE FILE accessed/Birthed/changed/modified (///) . -asince TIME -Bsince TIME -csince TIME -msince TIME ISO 8601 TIME accessed/Birthed/changed/modified (///) . -newerXY . -atime [-+]N -Btime [-+]N -ctime [-+]N -mtime [-+]N N accessed/Birthed/changed/modified (///) . -capable capabilities(7) POSIX.1e . -context GLOB SELinux GLOB . -depth [-+]N N. -empty / . -executable -readable -writable //. -false -true / (false/true). -flags [-+]FLAGS inode FLAGS. -fstype TYPE TYPE. -gid [-+]N -uid [-+]N / N. -group NAME -user NAME / NAME. -hidden ( . ). -ilname GLOB -iname GLOB -ipath GLOB -iregex REGEX -iwholename GLOB -lname/-name/-path/-regex/-wholename. -inum [-+]N inode N. -links [-+]N N . -lname GLOB GLOB . -name GLOB GLOB . -newer FILE FILE. -newerXY REFERENCE X Y REFERENCE . X Y [aBcm] (access/Birth/change/modification) . Y t REFERENCE ISO 8601 . : o 1991-12-14 o 1991-12-14T03:00 o 1991-12-14T03:00-07:00 o '1991-12-14 10:00Z' -nogroup -nouser / . -path GLOB -wholename GLOB GLOB . -perm [-+/]MODE . -regex REGEX REGEX . -samefile FILE FILE. -since TIME ISO 8601 TIME. -newerXY . -size [-+]N[cwbkMGTP] . : o chars (1 ) o words (2 ) o blocks (512 ) o kiB (1024 ) o MiB (1024 ) o GiB (1024 ) o TiB (1024 ) o PiB (1024 ) -sparse . -type [bcdlpfswD] . : o (block) o (character) o (directory) o (link) o (pipe) o (file) o (socket) o (whiteout) o (Door) . -type d,f . -used [-+]N N . -xattr (xattr(7)). -xattrname NAME NAME. -xtype [bcdlpfswD] -type . (ACTIONS) -delete -rm ( -depth). -exec command ... {} ; . -exec command ... {} + . -ok command ... {} ; . -execdir command ... {} ; -execdir command ... {} + -okdir command ... {} ; -exec/-ok () . -exit [STATUS] (0 ). -fls FILE -fprint FILE -fprint0 FILE -fprintf FILE FORMAT -ls/-print/-print0/-printf FILE . -limit N N . -ls ls -dils. -print . -print0 -print ('\0') . xargs -0 . -printf FORMAT ( find(1) ). : %w %a/%c/%t. %Wk k %Ak/%Ck/%Tk. -printx -print xargs(1). -print0 xargs -0 . -prune . -depth ( -delete) . -exclude . -quit . (ENVIRONMENT) bfs . LANG LC_* locale(7) . bfs . / ( -ok) locale . LS_COLORS BFS_COLORS -color. bfs LS_COLORS ls(1) ( dir_colors(5) ). BFS_COLORS bfs . NO_COLOR bfs -nocolor ( https://no-color.org/ ). PAGER (pager) -help. less(1) PATH more(1). PATH -exec[dir] -ok[dir] . POSIXLY_CORRECT bfs POSIX.1-2017 find(1) . : o POSIX ( -ok) . o -ls -fls . (POSIX find(1) BSD find(1) .) bfs POSIX . POSIXLY_CORRECT find(1) . (EXAMPLES) bfs bfs . bfs -name '*.txt' .txt . *.txt glob bfs . bfs -name access_log -L /var access_log /var . bfs . bfs ~ -not -user $USER . bfs -xtype l . bfs -name config -exclude -name .git config .git . bfs -type f -executable -exec strip {} + strip(1) . (BUGS) https://github.com/tavianator/bfs/issues (AUTHOR) Tavian Barnes https://tavianator.com/projects/bfs.html (SEE ALSO) find(1), locate(1), xargs(1) bfs 4.1.4 2026-06-29 BFS(1)