Man pages sections > man1 > bfs

bfs - Breadth-first version of find(1)

BFS(1) User Commands BFS(1)


bfs - Breadth-first version of find(1)


bfs [ flags...] [paths...] [expression...]


bfs is compatible with find; see find -help or man find for help with findcompatible options :)
flags ( -H/-L/-P etc.), paths, and expressions may be freely mixed in any order.
POSIX find features:
( expression ) ! expression expression [-a] expression expression -o expression
Follow symbolic links on the command line, but not while searching
Follow all symbolic links
Search in post-order (descendents first)
Don't descend into other mount points
-atime [-+]N
-ctime [-+]N
-mtime [-+]N
Find files accessed/changed/modified N days ago
-group NAME
Find files owned by the group/user NAME
-links [-+]N
Find files with N hard links
-name GLOB
Find files whose name matches the GLOB
-path GLOB
Find files whose entire path matches the GLOB
-newer FILE
Find files newer than FILE
-perm [-]MODE
Find files with a matching mode
-type [bcdlpfs]
Find files of the given type
-size [-+]N[c]
Find files with the given size
Don't descend into this directory
-exec command ... {} ;
Execute a command
-exec command ... {} +
Execute a command with multiple files at once
-ok command ... {} ;
Prompt the user whether to execute a command
Print the path to the found file
GNU find features:
-not expression
expression -and expression expression -or expression expression , expression
Never follow symbolic links (the default)
Turn on a debugging flag (see -D help)
Enable optimization level N (default: 3; interpreted differently than GNU find -- see below)
Search in post-order (same as -depth)
Measure times relative to the start of today
Follow all symbolic links (same as -L)
Whether to report an error if bfs detects that the file tree is modified during the search (default: -noignore_readdir_race)
-maxdepth N
-mindepth N
Ignore files deeper/shallower than N
Don't descend into other mount points (same as -xdev)
Ignored, for compatibility with GNU find
-regextype TYPE
Use TYPE-flavored regexes (see -regextype help)
Turn on or off warnings about the command line
-amin [-+]N
-cmin [-+]N
-mmin [-+]N
Find files accessed/changed/modified N minutes ago
-anewer FILE
-cnewer FILE
-mnewer FILE
Find files accessed/changed/modified more recently than FILE was modified
Find empty files/directories
Find files the current user can execute/read/write
Always false/true
-fstype TYPE
Find files on file systems with the given TYPE
-gid [-+]N
-uid [-+]N
Find files owned by group/user ID N
-inum [-+]N
Find files with inode number N
-lname GLOB
Find symbolic links whose target matches the GLOB
Find files whose X time is newer than the Y time of REFERENCE.
X and Y
can be any of [acm].
-regex REGEX
Find files whose entire path matches the regular expression REGEX
-samefile FILE
Find hard links to FILE
-size [-+]N[wbkMG]
2-byte words, 512-byte blocks, and kiB/MiB/GiB
-used [-+]N
Find files last accessed N days after they were changed
-wholename GLOB
Find files whose entire path matches the GLOB (same as -path)
-ilname GLOB
-iregex REGEX
-iwholename GLOB
Case-insensitive versions of -lname/-name/-path/-regex/-wholename
-xtype [bcdlpfs]
Find files of the given type, following links when -type would not, and vice versa
Delete any found files (implies -depth)
-execdir command ... {} ;
-execdir command ... {} +
command ... {} ;
Like -exec/-ok, but run the command in the same directory as the found file(s)
Like -print, but use the null character ('\0') as a separator rather than newlines
-printf FORMAT
Print according to a format string (see man find)
-fprint FILE
-fprint0 FILE
-fprintf FORMAT FILE
Like -print/-print0/-printf, but write to FILE instead of standard output
Quit immediately
Print version information
Print this help message
BSD find features:
Use extended regular expressions (same as -regextype posix-extended)
Filter out files with non-xargs-safe names
Don't descend into other mount points (same as -xdev)
Treat PATH as a path to search (useful if it may begin with a dash)
-depth [-+]N
Find files with depth N
-gid NAME
-uid NAME
Group/user names are supported in addition to numeric IDs
-size [-+]N[TP]
Find files that occupy fewer disk blocks than expected
-exit [STATUS]
Exit immediately with the given status (0 if unspecified)
Like -print, but escape whitespace and quotation characters, to make the output safe for xargs. Consider using -print0 and xargs -0 instead.
Delete any found files (same as -delete; implies -depth)
bfs-specific features:
Disable all optimizations
Basic logical simplification
All -O1 optimizations, plus dead code elimination and data flow analysis
-O3 (default)
All -O2 optimizations, plus re-order expressions to reduce expected cost
All optimizations, including aggressive optimizations that may alter the observed behavior in corner cases
Turn on or off file type colorization
Match hidden files, or filter them out
October 2017 bfs 1.1.3