summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-02-06 23:22:26 -0500
committerTavian Barnes <tavianator@tavianator.com>2019-02-06 23:22:26 -0500
commit010a755370eeb7450c0def58a8d5830ddcca7938 (patch)
treea36819df4100d1593fc14d8944e52d4a5958181a /parse.c
parentc2b1dde3d602485dde0b7e1176b2f73c19202067 (diff)
downloadbfs-010a755370eeb7450c0def58a8d5830ddcca7938.tar.xz
Re-write the help/manpage
I'm not sure people care very much whether the functionality they're looking up originated in POSIX/BSD/GNU find (and if they do, they can check those docs).
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c289
1 files changed, 125 insertions, 164 deletions
diff --git a/parse.c b/parse.c
index cc12e86..42a5a8f 100644
--- a/parse.c
+++ b/parse.c
@@ -2333,75 +2333,57 @@ static struct expr *parse_help(struct parser_state *state, int arg1, int arg2) {
"${cyn}Flags${rs} (${cyn}-H${rs}/${cyn}-L${rs}/${cyn}-P${rs} etc.), ${mag}paths${rs},\n"
"and ${blu}expressions${rs} may be freely mixed in any order.\n\n");
- cfprintf(cout, "${bld}POSIX find features:${rs}\n\n");
-
- cfprintf(cout, " ${red}(${rs} ${blu}expression${rs} ${red})${rs}\n");
- cfprintf(cout, " ${red}!${rs} ${blu}expression${rs}\n");
- cfprintf(cout, " ${blu}expression${rs} [${red}-a${rs}] ${blu}expression${rs}\n");
- cfprintf(cout, " ${blu}expression${rs} ${red}-o${rs} ${blu}expression${rs}\n\n");
+ cfprintf(cout, "${bld}Flags:${rs}\n\n");
cfprintf(cout, " ${cyn}-H${rs}\n");
cfprintf(cout, " Follow symbolic links on the command line, but not while searching\n");
cfprintf(cout, " ${cyn}-L${rs}\n");
- cfprintf(cout, " Follow all symbolic links\n\n");
+ cfprintf(cout, " Follow all symbolic links\n");
+ cfprintf(cout, " ${cyn}-P${rs}\n");
+ cfprintf(cout, " Never follow symbolic links (the default)\n");
- cfprintf(cout, " ${blu}-depth${rs}\n");
- cfprintf(cout, " Search in post-order (descendents first)\n");
- cfprintf(cout, " ${blu}-xdev${rs}\n");
- cfprintf(cout, " Don't descend into other mount points\n\n");
+ cfprintf(cout, " ${cyn}-E${rs}\n");
+ cfprintf(cout, " Use extended regular expressions (same as ${blu}-regextype${rs} ${bld}posix-extended${rs})\n");
+ cfprintf(cout, " ${cyn}-X${rs}\n");
+ cfprintf(cout, " Filter out files with non-${ex}xargs${rs}-safe names\n");
+ cfprintf(cout, " ${cyn}-d${rs}\n");
+ cfprintf(cout, " Search in post-order (same as ${blu}-depth${rs})\n");
+ cfprintf(cout, " ${cyn}-x${rs}\n");
+ cfprintf(cout, " Don't descend into other mount points (same as ${blu}-xdev${rs})\n");
- cfprintf(cout, " ${blu}-atime${rs} ${bld}[-+]N${rs}\n");
- cfprintf(cout, " ${blu}-ctime${rs} ${bld}[-+]N${rs}\n");
- cfprintf(cout, " ${blu}-mtime${rs} ${bld}[-+]N${rs}\n");
- cfprintf(cout, " Find files accessed/changed/modified ${bld}N${rs} days ago\n");
- cfprintf(cout, " ${blu}-group${rs} ${bld}NAME${rs}\n");
- cfprintf(cout, " ${blu}-user${rs} ${bld}NAME${rs}\n");
- cfprintf(cout, " Find files owned by the group/user ${bld}NAME${rs}\n");
- cfprintf(cout, " ${blu}-links${rs} ${bld}[-+]N${rs}\n");
- cfprintf(cout, " Find files with ${bld}N${rs} hard links\n");
- cfprintf(cout, " ${blu}-name${rs} ${bld}GLOB${rs}\n");
- cfprintf(cout, " Find files whose name matches the ${bld}GLOB${rs}\n");
- cfprintf(cout, " ${blu}-path${rs} ${bld}GLOB${rs}\n");
- cfprintf(cout, " Find files whose entire path matches the ${bld}GLOB${rs}\n");
- cfprintf(cout, " ${blu}-newer${rs} ${bld}FILE${rs}\n");
- cfprintf(cout, " Find files newer than ${bld}FILE${rs}\n");
- cfprintf(cout, " ${blu}-perm${rs} ${bld}[-]MODE${rs}\n");
- cfprintf(cout, " Find files with a matching mode\n");
- cfprintf(cout, " ${blu}-type${rs} ${bld}[bcdlpfs]${rs}\n");
- cfprintf(cout, " Find files of the given type\n");
- cfprintf(cout, " ${blu}-size${rs} ${bld}[-+]N[c]${rs}\n");
- cfprintf(cout, " Find files with the given size\n\n");
+ cfprintf(cout, " ${cyn}-f${rs} ${mag}PATH${rs}\n");
+ cfprintf(cout, " Treat ${mag}PATH${rs} as a path to search (useful if begins with a dash)\n");
+ cfprintf(cout, " ${cyn}-D${rs} ${bld}FLAG${rs}\n");
+ cfprintf(cout, " Turn on a debugging flag (see ${cyn}-D${rs} ${bld}help${rs})\n");
+ cfprintf(cout, " ${cyn}-O${rs}${bld}N${rs}\n");
+ cfprintf(cout, " Enable optimization level ${bld}N${rs} (default: 3)\n\n");
- cfprintf(cout, " ${blu}-prune${rs}\n");
- cfprintf(cout, " Don't descend into this directory\n");
- cfprintf(cout, " ${blu}-exec${rs} ${bld}command ... {} ;${rs}\n");
- cfprintf(cout, " Execute a command\n");
- cfprintf(cout, " ${blu}-exec${rs} ${bld}command ... {} +${rs}\n");
- cfprintf(cout, " Execute a command with multiple files at once\n");
- cfprintf(cout, " ${blu}-ok${rs} ${bld}command ... {} ;${rs}\n");
- cfprintf(cout, " Prompt the user whether to execute a command\n");
- cfprintf(cout, " ${blu}-print${rs}\n");
- cfprintf(cout, " Print the path to the found file\n\n");
+ cfprintf(cout, "${bld}Operators:${rs}\n\n");
+
+ cfprintf(cout, " ${red}(${rs} ${blu}expression${rs} ${red})${rs}\n\n");
+
+ cfprintf(cout, " ${red}!${rs} ${blu}expression${rs}\n");
+ cfprintf(cout, " ${red}-not${rs} ${blu}expression${rs}\n\n");
+
+ cfprintf(cout, " ${blu}expression${rs} ${blu}expression${rs}\n");
+ cfprintf(cout, " ${blu}expression${rs} ${red}-a${rs} ${blu}expression${rs}\n");
+ cfprintf(cout, " ${blu}expression${rs} ${red}-and${rs} ${blu}expression${rs}\n\n");
- cfprintf(cout, "${bld}GNU find features:${rs}\n\n");
+ cfprintf(cout, " ${blu}expression${rs} ${red}-o${rs} ${blu}expression${rs}\n");
+ cfprintf(cout, " ${blu}expression${rs} ${red}-or${rs} ${blu}expression${rs}\n\n");
- cfprintf(cout, " ${red}-not${rs} ${blu}expression${rs}\n");
- cfprintf(cout, " ${blu}expression${rs} ${red}-and${rs} ${blu}expression${rs}\n");
- cfprintf(cout, " ${blu}expression${rs} ${red}-or${rs} ${blu}expression${rs}\n");
cfprintf(cout, " ${blu}expression${rs} ${red},${rs} ${blu}expression${rs}\n\n");
- cfprintf(cout, " ${cyn}-P${rs}\n");
- cfprintf(cout, " Never follow symbolic links (the default)\n");
- cfprintf(cout, " ${cyn}-D${rs} ${bld}FLAG${rs}\n");
- cfprintf(cout, " Turn on a debugging flag (see ${cyn}-D${rs} ${bld}help${rs})\n");
- cfprintf(cout, " ${cyn}-O${rs}${bld}N${rs}\n");
- cfprintf(cout, " Enable optimization level ${bld}N${rs} (default: 3; interpreted differently than GNU\n");
- cfprintf(cout, " find -- see below)\n\n");
+ cfprintf(cout, "${bld}Options:${rs}\n\n");
- cfprintf(cout, " ${blu}-d${rs}\n");
- cfprintf(cout, " Search in post-order (same as ${blu}-depth${rs})\n");
+ cfprintf(cout, " ${blu}-color${rs}\n");
+ cfprintf(cout, " ${blu}-nocolor${rs}\n");
+ cfprintf(cout, " Turn colors on or off (default: ${blu}-color${rs} if outputting to a terminal,\n");
+ cfprintf(cout, " ${blu}-nocolor${rs} otherwise)\n");
cfprintf(cout, " ${blu}-daystart${rs}\n");
cfprintf(cout, " Measure times relative to the start of today\n");
+ cfprintf(cout, " ${blu}-depth${rs}\n");
+ cfprintf(cout, " Search in post-order (descendents first)\n");
cfprintf(cout, " ${blu}-follow${rs}\n");
cfprintf(cout, " Follow all symbolic links (same as ${cyn}-L${rs})\n");
cfprintf(cout, " ${blu}-ignore_readdir_race${rs}\n");
@@ -2412,7 +2394,8 @@ static struct expr *parse_help(struct parser_state *state, int arg1, int arg2) {
cfprintf(cout, " ${blu}-mindepth${rs} ${bld}N${rs}\n");
cfprintf(cout, " Ignore files deeper/shallower than ${bld}N${rs}\n");
cfprintf(cout, " ${blu}-mount${rs}\n");
- cfprintf(cout, " Don't descend into other mount points (same as ${blu}-xdev${rs})\n");
+ cfprintf(cout, " ${blu}-xdev${rs}\n");
+ cfprintf(cout, " Don't descend into other mount points\n");
cfprintf(cout, " ${blu}-noleaf${rs}\n");
cfprintf(cout, " Ignored; for compatibility with GNU find\n");
cfprintf(cout, " ${blu}-regextype${rs} ${bld}TYPE${rs}\n");
@@ -2422,14 +2405,24 @@ static struct expr *parse_help(struct parser_state *state, int arg1, int arg2) {
cfprintf(cout, " ${blu}-nowarn${rs}\n");
cfprintf(cout, " Turn on or off warnings about the command line\n\n");
- cfprintf(cout, " ${blu}-amin${rs} ${bld}[-+]N${rs}\n");
- cfprintf(cout, " ${blu}-cmin${rs} ${bld}[-+]N${rs}\n");
- cfprintf(cout, " ${blu}-mmin${rs} ${bld}[-+]N${rs}\n");
- cfprintf(cout, " Find files accessed/changed/modified ${bld}N${rs} minutes ago\n");
- cfprintf(cout, " ${blu}-anewer${rs} ${bld}FILE${rs}\n");
- cfprintf(cout, " ${blu}-cnewer${rs} ${bld}FILE${rs}\n");
- cfprintf(cout, " ${blu}-mnewer${rs} ${bld}FILE${rs}\n");
- cfprintf(cout, " Find files accessed/changed/modified more recently than ${bld}FILE${rs} was modified\n");
+ cfprintf(cout, "${bld}Tests:${rs}\n\n");
+
+#if BFS_HAS_SYS_ACL
+ cfprintf(cout, " ${blu}-acl${rs}\n");
+ cfprintf(cout, " Find files with non-trivial Access Control Lists\n");
+#endif
+ cfprintf(cout, " ${blu}-${rs}[${blu}aBcm${rs}]${blu}min${rs} ${bld}[-+]N${rs}\n");
+ cfprintf(cout, " Find files ${blu}a${rs}ccessed/${blu}B${rs}irthed/${blu}c${rs}hanged/${blu}m${rs}odified ${bld}N${rs} minutes ago\n");
+ cfprintf(cout, " ${blu}-${rs}[${blu}aBcm${rs}]${blu}newer${rs} ${bld}FILE${rs}\n");
+ cfprintf(cout, " Find files ${blu}a${rs}ccessed/${blu}B${rs}irthed/${blu}c${rs}hanged/${blu}m${rs}odified more recently than ${bld}FILE${rs} was modified\n");
+ cfprintf(cout, " ${blu}-${rs}[${blu}aBcm${rs}]${blu}time${rs} ${bld}[-+]N${rs}\n");
+ cfprintf(cout, " Find files ${blu}a${rs}ccessed/${blu}B${rs}irthed/${blu}c${rs}hanged/${blu}m${rs}odified ${bld}N${rs} days ago\n");
+#if BFS_HAS_POSIX1E_CAPABILITIES
+ cfprintf(cout, " ${blu}-capable${rs}\n");
+ cfprintf(cout, " Match files with POSIX.1e capabilities set\n");
+#endif
+ cfprintf(cout, " ${blu}-depth${rs} ${bld}[-+]N${rs}\n");
+ cfprintf(cout, " Find files with depth ${bld}N${rs}\n");
cfprintf(cout, " ${blu}-empty${rs}\n");
cfprintf(cout, " Find empty files/directories\n");
cfprintf(cout, " ${blu}-executable${rs}\n");
@@ -2444,140 +2437,108 @@ static struct expr *parse_help(struct parser_state *state, int arg1, int arg2) {
cfprintf(cout, " ${blu}-gid${rs} ${bld}[-+]N${rs}\n");
cfprintf(cout, " ${blu}-uid${rs} ${bld}[-+]N${rs}\n");
cfprintf(cout, " Find files owned by group/user ID ${bld}N${rs}\n");
+ cfprintf(cout, " ${blu}-group${rs} ${bld}NAME${rs}\n");
+ cfprintf(cout, " ${blu}-user${rs} ${bld}NAME${rs}\n");
+ cfprintf(cout, " Find files owned by the group/user ${bld}NAME${rs}\n");
+ cfprintf(cout, " ${blu}-hidden${rs}\n");
+ cfprintf(cout, " ${blu}-nohidden${rs}\n");
+ cfprintf(cout, " Match hidden files, or filter them out\n");
+#ifdef FNM_CASEFOLD
+ cfprintf(cout, " ${blu}-ilname${rs} ${bld}GLOB${rs}\n");
+ cfprintf(cout, " ${blu}-iname${rs} ${bld}GLOB${rs}\n");
+ cfprintf(cout, " ${blu}-ipath${rs} ${bld}GLOB${rs}\n");
+ cfprintf(cout, " ${blu}-iregex${rs} ${bld}REGEX${rs}\n");
+ cfprintf(cout, " ${blu}-iwholename${rs} ${bld}GLOB${rs}\n");
+ cfprintf(cout, " Case-insensitive versions of ${blu}-lname${rs}/${blu}-name${rs}/${blu}-path${rs}"
+ "/${blu}-regex${rs}/${blu}-wholename${rs}\n");
+#endif
cfprintf(cout, " ${blu}-inum${rs} ${bld}[-+]N${rs}\n");
cfprintf(cout, " Find files with inode number ${bld}N${rs}\n");
+ cfprintf(cout, " ${blu}-links${rs} ${bld}[-+]N${rs}\n");
+ cfprintf(cout, " Find files with ${bld}N${rs} hard links\n");
cfprintf(cout, " ${blu}-lname${rs} ${bld}GLOB${rs}\n");
cfprintf(cout, " Find symbolic links whose target matches the ${bld}GLOB${rs}\n");
+ cfprintf(cout, " ${blu}-name${rs} ${bld}GLOB${rs}\n");
+ cfprintf(cout, " Find files whose name matches the ${bld}GLOB${rs}\n");
+ cfprintf(cout, " ${blu}-newer${rs} ${bld}FILE${rs}\n");
+ cfprintf(cout, " Find files newer than ${bld}FILE${rs}\n");
cfprintf(cout, " ${blu}-newer${rs}${bld}XY${rs} ${bld}REFERENCE${rs}\n");
cfprintf(cout, " Find files whose ${bld}X${rs} time is newer than the ${bld}Y${rs} time of"
" ${bld}REFERENCE${rs}. ${bld}X${rs} and ${bld}Y${rs}\n");
- cfprintf(cout, " can be any of [aBcm].\n");
+ cfprintf(cout, " can be any of [${bld}aBcm${rs}].\n");
+ cfprintf(cout, " ${blu}-nogroup${rs}\n");
+ cfprintf(cout, " ${blu}-nouser${rs}\n");
+ cfprintf(cout, " Find files owned by nonexistent groups/users\n");
+ cfprintf(cout, " ${blu}-path${rs} ${bld}GLOB${rs}\n");
+ cfprintf(cout, " ${blu}-wholename{rs} ${bld}GLOB${rs}\n");
+ cfprintf(cout, " Find files whose entire path matches the ${bld}GLOB${rs}\n");
+ cfprintf(cout, " ${blu}-perm${rs} ${bld}[-]MODE${rs}\n");
+ cfprintf(cout, " Find files with a matching mode\n");
cfprintf(cout, " ${blu}-regex${rs} ${bld}REGEX${rs}\n");
cfprintf(cout, " Find files whose entire path matches the regular expression ${bld}REGEX${rs}\n");
cfprintf(cout, " ${blu}-samefile${rs} ${bld}FILE${rs}\n");
cfprintf(cout, " Find hard links to ${bld}FILE${rs}\n");
- cfprintf(cout, " ${blu}-size${rs} ${bld}[-+]N[cwbkMG]${rs}\n");
- cfprintf(cout, " 1-byte ${bld}c${rs}haracters, 2-byte ${bld}w${rs}ords, 512-byte ${bld}b${rs}locks, and"
- " ${bld}k${rs}iB/${bld}M${rs}iB/${bld}G${rs}iB\n");
- cfprintf(cout, " ${blu}-type${rs} ${bld}[bcdlpfsD]${rs}\n");
- cfprintf(cout, " The ${bld}D${rs}oor file type is also supported on platforms that have it (Solaris)\n");
+ cfprintf(cout, " ${blu}-size${rs} ${bld}[-+]N[cwbkMGTP]${rs}\n");
+ cfprintf(cout, " Find files with the given size, in 1-byte ${bld}c${rs}haracters, 2-byte ${bld}w${rs}ords,\n");
+ cfprintf(cout, " 512-byte ${bld}b${rs}locks (default), or ${bld}k${rs}iB/${bld}M${rs}iB/${bld}G${rs}iB/${bld}T${rs}iB/${bld}P${rs}iB\n");
+ cfprintf(cout, " ${blu}-sparse${rs}\n");
+ cfprintf(cout, " Find files that occupy fewer disk blocks than expected\n");
+ cfprintf(cout, " ${blu}-type${rs} ${bld}[bcdlpfswD]${rs}\n");
+ cfprintf(cout, " Find files of the given type\n");
cfprintf(cout, " ${blu}-used${rs} ${bld}[-+]N${rs}\n");
cfprintf(cout, " Find files last accessed ${bld}N${rs} days after they were changed\n");
- cfprintf(cout, " ${blu}-wholename${rs} ${bld}GLOB${rs}\n");
- cfprintf(cout, " Find files whose entire path matches the ${bld}GLOB${rs} (same as ${blu}-path${rs})\n");
-#ifdef FNM_CASEFOLD
- cfprintf(cout, " ${blu}-ilname${rs} ${bld}GLOB${rs}\n");
- cfprintf(cout, " ${blu}-iname${rs} ${bld}GLOB${rs}\n");
- cfprintf(cout, " ${blu}-ipath${rs} ${bld}GLOB${rs}\n");
- cfprintf(cout, " ${blu}-iregex${rs} ${bld}REGEX${rs}\n");
- cfprintf(cout, " ${blu}-iwholename${rs} ${bld}GLOB${rs}\n");
- cfprintf(cout, " Case-insensitive versions of ${blu}-lname${rs}/${blu}-name${rs}/${blu}-path${rs}"
- "/${blu}-regex${rs}/${blu}-wholename${rs}\n");
-#endif
- cfprintf(cout, " ${blu}-xtype${rs} ${bld}[bcdlpfsD]${rs}\n");
+ cfprintf(cout, " ${blu}-xtype${rs} ${bld}[bcdlpfswD]${rs}\n");
cfprintf(cout, " Find files of the given type, following links when ${blu}-type${rs} would not, and\n");
cfprintf(cout, " vice versa\n\n");
+ cfprintf(cout, "${bld}Actions:${rs}\n\n");
+
cfprintf(cout, " ${blu}-delete${rs}\n");
+ cfprintf(cout, " ${blu}-rm${rs}\n");
cfprintf(cout, " Delete any found files (implies ${blu}-depth${rs})\n");
+ cfprintf(cout, " ${blu}-exec${rs} ${bld}command ... {} ;${rs}\n");
+ cfprintf(cout, " Execute a command\n");
+ cfprintf(cout, " ${blu}-exec${rs} ${bld}command ... {} +${rs}\n");
+ cfprintf(cout, " Execute a command with multiple files at once\n");
+ cfprintf(cout, " ${blu}-ok${rs} ${bld}command ... {} ;${rs}\n");
+ cfprintf(cout, " Prompt the user whether to execute a command\n");
cfprintf(cout, " ${blu}-execdir${rs} ${bld}command ... {} ;${rs}\n");
cfprintf(cout, " ${blu}-execdir${rs} ${bld}command ... {} +${rs}\n");
- cfprintf(cout, " ${blu}-okdir${rs} ${bld}command ... {} ;${rs}\n");
+ cfprintf(cout, " ${blu}-okdir${rs} ${bld}command ... {} ;${rs}\n");
cfprintf(cout, " Like ${blu}-exec${rs}/${blu}-ok${rs}, but run the command in the same directory as the found\n");
cfprintf(cout, " file(s)\n");
- cfprintf(cout, " ${blu}-ls${rs}\n");
- cfprintf(cout, " List files like ${ex}ls${rs} ${bld}-dils${rs}\n");
- cfprintf(cout, " ${blu}-print0${rs}\n");
- cfprintf(cout, " Like ${blu}-print${rs}, but use the null character ('\\0') as a separator rather than\n");
- cfprintf(cout, " newlines\n");
- cfprintf(cout, " ${blu}-printf${rs} ${bld}FORMAT${rs}\n");
- cfprintf(cout, " Print according to a format string (see ${ex}man${rs} ${bld}find${rs})\n");
+ cfprintf(cout, " ${blu}-exit${rs} [${bld}STATUS${rs}]\n");
+ cfprintf(cout, " Exit immediately with the given status (%d if unspecified)\n", EXIT_SUCCESS);
cfprintf(cout, " ${blu}-fls${rs} ${bld}FILE${rs}\n");
cfprintf(cout, " ${blu}-fprint${rs} ${bld}FILE${rs}\n");
cfprintf(cout, " ${blu}-fprint0${rs} ${bld}FILE${rs}\n");
cfprintf(cout, " ${blu}-fprintf${rs} ${bld}FORMAT${rs} ${bld}FILE${rs}\n");
cfprintf(cout, " Like ${blu}-ls${rs}/${blu}-print${rs}/${blu}-print0${rs}/${blu}-printf${rs}, but write to"
" ${bld}FILE${rs} instead of standard output\n");
+ cfprintf(cout, " ${blu}-ls${rs}\n");
+ cfprintf(cout, " List files like ${ex}ls${rs} ${bld}-dils${rs}\n");
+ cfprintf(cout, " ${blu}-nohidden${rs}\n");
+ cfprintf(cout, " Filter out hidden files and directories\n");
+ cfprintf(cout, " ${blu}-print${rs}\n");
+ cfprintf(cout, " Print the path to the found file\n");
+ cfprintf(cout, " ${blu}-print0${rs}\n");
+ cfprintf(cout, " Like ${blu}-print${rs}, but use the null character ('\\0') as a separator rather than\n");
+ cfprintf(cout, " newlines\n");
+ cfprintf(cout, " ${blu}-printf${rs} ${bld}FORMAT${rs}\n");
+ cfprintf(cout, " Print according to a format string (see ${ex}man${rs} ${bld}find${rs}). The additional format\n");
+ cfprintf(cout, " directives %%w and %%W${bld}k${rs} for printing file birth times are supported.\n");
+ cfprintf(cout, " ${blu}-printx${rs}\n");
+ cfprintf(cout, " Like ${blu}-print${rs}, but escape whitespace and quotation characters, to make the\n");
+ cfprintf(cout, " output safe for ${ex}xargs${rs}. Consider using ${blu}-print0${rs} and ${ex}xargs${rs} ${bld}-0${rs} instead.\n");
+ cfprintf(cout, " ${blu}-prune${rs}\n");
+ cfprintf(cout, " Don't descend into this directory\n");
cfprintf(cout, " ${blu}-quit${rs}\n");
- cfprintf(cout, " Quit immediately\n\n");
-
+ cfprintf(cout, " Quit immediately\n");
cfprintf(cout, " ${blu}-version${rs}\n");
cfprintf(cout, " Print version information\n");
cfprintf(cout, " ${blu}-help${rs}\n");
cfprintf(cout, " Print this help message\n\n");
- cfprintf(cout, "${bld}BSD find features:${rs}\n\n");
-
- cfprintf(cout, " ${cyn}-E${rs}\n");
- cfprintf(cout, " Use extended regular expressions (same as ${blu}-regextype${rs} ${bld}posix-extended${rs})\n");
- cfprintf(cout, " ${cyn}-X${rs}\n");
- cfprintf(cout, " Filter out files with non-${ex}xargs${rs}-safe names\n");
- cfprintf(cout, " ${cyn}-x${rs}\n");
- cfprintf(cout, " Don't descend into other mount points (same as ${blu}-xdev${rs})\n\n");
-
- cfprintf(cout, " ${cyn}-f${rs} ${mag}PATH${rs}\n");
- cfprintf(cout, " Treat ${mag}PATH${rs} as a path to search (useful if begins with a dash)\n\n");
-
-#if BFS_HAS_SYS_ACL
- cfprintf(cout, " ${blu}-acl${rs}\n");
- cfprintf(cout, " Find files with non-trivial Access Control Lists\n");
-#endif
- cfprintf(cout, " ${blu}-Bmin${rs} ${bld}[-+]N${rs}\n");
- cfprintf(cout, " ${blu}-Btime${rs} ${bld}[-+]N${rs}\n");
- cfprintf(cout, " Find files Birthed ${bld}N${rs} minutes/days ago\n");
- cfprintf(cout, " ${blu}-Bnewer${rs} ${bld}FILE${rs}\n");
- cfprintf(cout, " Find files Birthed more recently than ${bld}FILE${rs} was modified\n");
- cfprintf(cout, " ${blu}-depth${rs} ${bld}[-+]N${rs}\n");
- cfprintf(cout, " Find files with depth ${bld}N${rs}\n");
- cfprintf(cout, " ${blu}-gid${rs} ${bld}NAME${rs}\n");
- cfprintf(cout, " ${blu}-uid${rs} ${bld}NAME${rs}\n");
- cfprintf(cout, " Group/user names are supported in addition to numeric IDs\n");
- cfprintf(cout, " ${blu}-size${rs} ${bld}[-+]N[cwbkMGTP]${rs}\n");
- cfprintf(cout, " Units of ${bld}T${rs}iB/${bld}P${rs}iB are additionally supported\n");
- cfprintf(cout, " ${blu}-sparse${rs}\n");
- cfprintf(cout, " Find files that occupy fewer disk blocks than expected\n\n");
-
- cfprintf(cout, " ${blu}-exit${rs} ${bld}[STATUS]${rs}\n");
- cfprintf(cout, " Exit immediately with the given status (%d if unspecified)\n", EXIT_SUCCESS);
- cfprintf(cout, " ${blu}-printx${rs}\n");
- cfprintf(cout, " Like ${blu}-print${rs}, but escape whitespace and quotation characters, to make the\n");
- cfprintf(cout, " output safe for ${ex}xargs${rs}. Consider using ${blu}-print0${rs} and ${ex}xargs${rs} ${bld}-0${rs} instead.\n");
- cfprintf(cout, " ${blu}-rm${rs}\n");
- cfprintf(cout, " Delete any found files (same as ${blu}-delete${rs}; implies ${blu}-depth${rs})\n\n");
-
- cfprintf(cout, "${ex}bfs${rs}${bld}-specific features:${rs}\n\n");
-
- cfprintf(cout, " ${cyn}-O${rs}${bld}0${rs}\n");
- cfprintf(cout, " Disable all optimizations\n");
- cfprintf(cout, " ${cyn}-O${rs}${bld}1${rs}\n");
- cfprintf(cout, " Basic logical simplification\n");
- cfprintf(cout, " ${cyn}-O${rs}${bld}2${rs}\n");
- cfprintf(cout, " All ${cyn}-O${rs}${bld}1${rs} optimizations, plus dead code elimination and data flow analysis\n");
- cfprintf(cout, " ${cyn}-O${rs}${bld}3${rs} (default)\n");
- cfprintf(cout, " All ${cyn}-O${rs}${bld}2${rs} optimizations, plus re-order expressions to reduce expected cost\n");
- cfprintf(cout, " ${cyn}-O${rs}${bld}4${rs}/${cyn}-O${rs}${bld}fast${rs}\n");
- cfprintf(cout, " All optimizations, including aggressive optimizations that may alter the\n");
- cfprintf(cout, " observed behavior in corner cases\n\n");
-
- cfprintf(cout, " ${blu}-color${rs}\n");
- cfprintf(cout, " ${blu}-nocolor${rs}\n");
- cfprintf(cout, " Turn colors on or off (default: ${blu}-color${rs} if outputting to a terminal,\n");
- cfprintf(cout, " ${blu}-nocolor${rs} otherwise)\n\n");
-
-#if BFS_HAS_POSIX1E_CAPABILITIES
- cfprintf(cout, " ${blu}-capable${rs}\n");
- cfprintf(cout, " Match files with POSIX.1e capabilities set\n\n");
-#endif
-
- cfprintf(cout, " ${blu}-hidden${rs}\n");
- cfprintf(cout, " ${blu}-nohidden${rs}\n");
- cfprintf(cout, " Match hidden files, or filter them out\n\n");
-
- cfprintf(cout, " ${blu}-printf${rs} ${bld}FORMAT${rs}\n");
- cfprintf(cout, " ${blu}-fprintf${rs} ${bld}FORMAT${rs} ${bld}FILE${rs}\n");
- cfprintf(cout, " The additional format directives %%w and %%W${bld}k${rs} for printing file birth times\n");
- cfprintf(cout, " are supported.\n\n");
-
cfprintf(cout, "%s\n", BFS_HOMEPAGE);
state->just_info = true;