aboutsummaryrefslogtreecommitdiff
path: root/findutils/find.c
AgeCommit message (Collapse)Author
2014-09-05find: support -perm /BITS. Closes 7340Denys Vlasenko
function old new delta parse_params 1487 1497 +10 func_perm 57 61 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 14/0) Total: 14 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-06-22find: use sysconf(_SC_ARG_MAX) to determine the command-line size limitDenys Vlasenko
The find utility uses a hardcoded value of 32 * 1024 as the limit of the command-line length when calling 'find -exec ... {} +'. This results in over 4 times more execve() calls than in coreutils' find. This patch uses the limit defined in system headers. Based on the patch by Bartosz Golaszewski <bartekgola@gmail.com>. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-06-19find: exit code fixes for find -execDenys Vlasenko
function old new delta func_exec 127 100 -27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-06-17find: add optional support for '-exec ... {} +'Bartosz Golaszewski
function old new delta do_exec - 309 +309 parse_params 1416 1487 +71 find_main 342 406 +64 packed_usage 29958 30014 +56 func_exec 138 127 -11 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/1 up/down: 500/-11) Total: 489 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-27xargs: add support for -I and -i. Closes 493Denys Vlasenko
function old new delta process_stdin_with_replace - 195 +195 xmalloc_substitute_string - 145 +145 xargs_main 808 884 +76 count_strstr - 45 +45 packed_usage 29580 29571 -9 parse_params 1445 1416 -29 func_exec 285 138 -147 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 1/3 up/down: 461/-185) Total: 276 bytes text data bss dec hex filename 922156 932 17692 940780 e5aec busybox_old 922440 932 17692 941064 e5c08 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-26find: code shrinkDenys Vlasenko
function old new delta func_exec 306 285 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-09find: fix a regression introduced with -HLP supportDenys Vlasenko
function old new delta find_main 294 342 +48 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-30Whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-16find:: get rid of nested function (it's a gcc-ism)Denys Vlasenko
function old new delta alloc_action - 80 +80 parse_params 1459 1445 -14 static.alloc_action 98 - -98 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/1 up/down: 80/-112) Total: -32 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-14find: support -HLPDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14whitespace fixes. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-06find: make -mindepth N -xdev correctly stop on mountpointsDenys Vlasenko
function old new delta fileAction 153 193 +40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-18typo fix in commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-17find: if DESKTOP=y, support -wholename (synonym for -path)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-28Fix find -follow supportIan Wienand
Signed-off-by: Ian Wienand <ianw@vmware.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-11find: fix a bug in !ENABLE_FEATURE_FIND_XDEV configDenys Vlasenko
A subtle one: wrong pairing of "else"! Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05*: remove "Options:" string from help textsDenys Vlasenko
function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-23find: cater for libc w/o FNM_CASEFOLDDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-22find: implement -ipathBogdan Harjoc
Signed-off-by: Bogdan Harjoc <harjoc@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-12find: trim help text a bitDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-12find: remove the hack we use to parse options first, replace with simpler codeDenys Vlasenko
text data bss dec hex filename 867764 438 7552 875754 d5cea busybox_old 867629 438 7552 875619 d5c63 busybox_unstripped function old new delta parse_params 1377 1440 +63 static.params 151 192 +41 static.options 42 57 +15 fileAction 151 153 +2 find_main 466 267 -199 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/1 up/down: 121/-199) Total: -78 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-12find: print/print0/prune _can_ be inverted, fix itDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-12find: document ! (not) operatorDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-12find: help text: PATH must be firstDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-12find: yet another tweak to help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-12find: fix help text about -prune: it also does assume -printDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-12find: significantly improve hext text. +116 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18mass removal of underscores from _BB_DIR_foo and _BB_SUID_fooDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-31find: add rudimentary support for -exec {} +Denys Vlasenko
function old new delta parse_params 1421 1414 -7 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-12*: s/xatoi_u/xatoi_positive/g - I got bored of mistyping xatoi_u as xatou_iDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-15findutils/*: move usage and applet bits to *.c filesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06remove defconfig. Now "make defconfig" simply uses defaults from Config.inDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-09make it possible to keep Config/Kbuild snippets in *.c filesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-26find: fix -name matching for dotfiles. -1 byteDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23*: merge some common stringsDenys Vlasenko
text data bss dec hexfilename 838650 8009 0 846659 ceb43busybox_old 838519 8009 0 846528 ceac0busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-25find: tweak error messageBernhard Reutner-Fischer
big find: find: missing argument to `-exec' we now say find: -exec requires an argument instead of the cryptic message we emitted previously. Additional benefit is that it's now 23 bytes smaller. Add TODO to add '-exec {} +' support Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-04*: suppress ~60% of "aliased warnings" on gcc-4.4.1Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-10find: correct handling of -xdevDenys Vlasenko
function old new delta find_main 467 448 -19 fileAction 1336 1311 -25 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-06find: add optional support for -links. +100 bytesMatheus Izvekov
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04*: remove some uses of argcDenys Vlasenko
function old new delta whoami_main 34 37 +3 logname_main 60 63 +3 hostid_main 35 38 +3 ttysize_main 136 135 -1 nmeter_main 673 672 -1 logger_main 387 386 -1 uuencode_main 330 328 -2 ifupdown_main 2125 2123 -2 mesg_main 158 155 -3 free_main 333 330 -3 cal_main 902 899 -3 acpid_main 443 440 -3 ar_main 196 189 -7 find_main 476 467 -9 ifconfig_main 1235 1221 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/12 up/down: 9/-49) Total: -40 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-30find: add zeroing of G.xxx; ftpd - remove extraneous zeroing of G.xxxDenys Vlasenko
Brought "G trick" to the same shape in a few more places. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-29find: -follow should not error out on dandling linksDenys Vlasenko
function old new delta recursive_action 425 465 +40 find_main 436 465 +29 test_main 247 253 +6 need_print 1 - -1 doCommands 2523 2521 -2 compare_keys 737 735 -2 xdev_dev 4 - -4 xdev_count 4 - -4 recurse_flags 4 - -4 mkfs_vfat_main 1609 1605 -4 actions 4 - -4 fileAction 588 583 -5 ------------------------------------------------------------------------------ (add/remove: 0/5 grow/shrink: 3/4 up/down: 75/-30) Total: 45 bytes text data bss dec hex filename 822711 450 7684 830845 cad7d busybox_old 822773 445 7668 830886 cada6 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-27find: do not recurse into directories with depth == --maxdepthDenys Vlasenko
This may avoid many, many unnecessary stat() calls function old new delta fileAction 718 758 +40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23*: more portability fixes by Dan FandrichDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-13add USE_PORTABLE_CODE option and use it in find appletDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06more C standard compat fixes from Dan FandrichDenys Vlasenko
function old new delta docolon 207 204 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05*: add FAST_FUNC to function ptrs where it makes senseDenys Vlasenko
function old new delta evalcommand 1195 1209 +14 testcmd - 10 +10 printfcmd - 10 +10 echocmd - 10 +10 func_exec 270 276 +6 echo_dg 104 109 +5 store_nlmsg 85 89 +4 pseudo_exec_argv 195 198 +3 dotcmd 287 290 +3 machtime_stream 29 31 +2 discard_stream 24 26 +2 argstr 1299 1301 +2 killcmd 108 109 +1 evalfor 226 227 +1 daytime_stream 43 44 +1 run_list 2544 2543 -1 lookupvar 62 61 -1 ipaddr_modify 1310 1309 -1 ... parse_stream 2254 2245 -9 evalpipe 356 347 -9 collect_if 210 197 -13 read_opt 869 851 -18 handle_dollar 681 658 -23 print_addrinfo 1342 1303 -39 iterate_on_dir 156 59 -97 print_route 1709 1609 -100 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 12/130 up/down: 74/-767) Total: -693 bytes text data bss dec hex filename 841748 467 7872 850087 cf8a7 busybox_old 841061 467 7872 849400 cf5f8 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-04-21*: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
2009-03-20Compatibility fixes:Denis Vlasenko
grep: support -z find: support --mindepth together +45 bytes cpio: support -p (configurable, +230 bytes) libbb: tweaks for cpio