aboutsummaryrefslogtreecommitdiff
path: root/findutils (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Spelling fixes in comments, documentation, tests and examplesDenys Vlasenko2017-04-172-3/+3
| | | | | | By klemens <ka7@github.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: FEATURE_GREP_CONTEXT should be available for "fgrep only" tooDenys Vlasenko2017-04-121-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add comment about APPLET_ODDNAME formatDenys Vlasenko2017-01-291-0/+1
| | | | | | It confused me more than once Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Big cleanup in config help and descriptionDenys Vlasenko2017-01-101-14/+0
| | | | | | | | | | | | | Redundant help texts (one which only repeats the description) are deleted. Descriptions and help texts are trimmed. Some config options are moved, even across menus. No config option _names_ are changed. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: fix handling of trailing slashes in -name PATTERN comparisonsDenys Vlasenko2016-11-251-9/+37
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Make grep/egrep/fgrep independently selectableDenys Vlasenko2016-11-141-30/+22
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix "aloc" -> "alloc" typosDenys Vlasenko2016-09-171-7/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LISTDenys Vlasenko2016-07-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many cases, this aqllows to drop use of opt_complementary. Approximately -400 bytes: function old new delta getopt32 1423 1502 +79 opt_string 17 18 +1 OPT_STR 24 25 +1 uniq_main 416 406 -10 timeout_main 279 269 -10 sulogin_main 270 260 -10 readprofile_main 1825 1815 -10 ps_main 543 533 -10 pidof_main 245 235 -10 pgrep_main 611 601 -10 od_main 2600 2590 -10 mkfs_minix_main 2684 2674 -10 mkfs_ext2_main 2603 2593 -10 microcom_main 712 702 -10 makemime_main 315 305 -10 ionice_main 282 272 -10 inetd_main 2074 2064 -10 ifplugd_main 1144 1134 -10 halt_main 353 343 -10 getopt_main 636 626 -10 fdisk_main 2854 2844 -10 env_main 206 196 -10 dmesg_main 319 309 -10 conspy_main 1214 1204 -10 awk_main 981 971 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/22 up/down: 81/-220) Total: -139 bytes text data bss dec hex filename 919373 906 14060 934339 e41c3 busybox_old 918969 906 14060 933935 e402f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* randomconfig fixes 3Denys Vlasenko2016-06-201-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add most of the required setup_common_bufsiz() callsDenys Vlasenko2016-04-213-0/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko2016-04-213-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: make errors other than "not found" result in exit code 2. Closes 8796Denys Vlasenko2016-03-281-2/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* xargs: make -I imply -rAaro Koskinen2015-10-241-0/+3
| | | | | | | | | | | | Make -I imply -r (GNU findutils seems to do the same). Fixes the following bug: $ echo -n | xargs -I% echo % Segmentation fault Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libiproute: rename invarg(a,b) to invarg_1_to_2(a,b)Denys Vlasenko2015-10-141-1/+1
| | | | | | | | | | | | | | invarg(a,b) - "invalid argument", but how a and b enter the message? invarg_1_to_2(a,b) is somewhat easier to read: "invalid argument 'a' to 'b'" Audit of usage revealed a number of bad uses, with too long messages. text data bss dec hex filename 938848 932 17448 957228 e9b2c busybox_old 938788 932 17448 957168 e9af0 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: more BUILD_BUG_ON conversionsDenys Vlasenko2015-10-132-6/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* join some common strings, -400 bytesDenys Vlasenko2015-10-081-1/+1
| | | | | | | | | | | | | | | function old new delta print_intel_cstates 499 511 +12 file_insert 355 364 +9 dpkg_main 2944 2940 -4 ifenslave_main 645 640 -5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 21/-9) Total: 12 bytes text data bss dec hex filename 937564 932 17676 956172 e970c busybox_old 937164 932 17676 955772 e957c busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: support "find . -delete" idiom - do not try rmdir(".")Denys Vlasenko2015-10-071-1/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: more compact API for bb_parse_mode()Denys Vlasenko2015-10-071-1/+2
| | | | | | | | | | | | | | | | | function old new delta make_device 2182 2188 +6 parse_command 1440 1443 +3 parse_params 1497 1499 +2 install_main 773 769 -4 mkdir_main 168 160 -8 getoptscmd 641 632 -9 builtin_umask 158 147 -11 bb_parse_mode 431 410 -21 umaskcmd 286 258 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/6 up/down: 11/-81) Total: -70 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fixesManinder Singh2015-05-251-1/+1
| | | | | Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: fix regression in status processing for path argumentsFelix Fietkau2015-04-141-4/+2
| | | | | | | | | | | | | | | Regression added in commit 14158b4127dba30466c50147b868a6a89702960b "find: add optional support for '-exec ... {} +'" This commit causes find to exit on the first path argument that was not found, which breaks existing scripts and is incompatible to other implementations. Instead of exiting on the first failure, return EXIT_FAILURE at the end if any error occurred. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: support -perm /BITS. Closes 7340Denys Vlasenko2014-09-051-4/+4
| | | | | | | | | | 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>
* grep: fix "grep -r PATTRN SYMLINK_TO_DIR"Denys Vlasenko2014-08-281-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: use sysconf(_SC_ARG_MAX) to determine the command-line size limitDenys Vlasenko2014-06-222-17/+13
| | | | | | | | | | | | 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>
* find: exit code fixes for find -execDenys Vlasenko2014-06-191-8/+9
| | | | | | | function old new delta func_exec 127 100 -27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: add optional support for '-exec ... {} +'Bartosz Golaszewski2014-06-171-15/+141
| | | | | | | | | | | | | | 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>
* xargs: fix compilation breakageDenys Vlasenko2014-02-271-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: fix -w match if first match isn't a word, but second is. Closes 4520Denys Vlasenko2014-02-271-14/+15
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* xargs: add support for -I and -i. Closes 493Denys Vlasenko2014-02-272-56/+129
| | | | | | | | | | | | | | | | | | 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>
* find: code shrinkDenys Vlasenko2014-02-261-5/+3
| | | | | | | function old new delta func_exec 306 285 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: properly handle grep -w "^str" in !EXTRA_COMPAT case tooBartosz Golaszewski2014-02-071-2/+6
| | | | | | | | function old new delta grep_file 1267 1288 +21 Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: fix a regression introduced with -HLP supportDenys Vlasenko2014-01-091-1/+20
| | | | | | | function old new delta find_main 294 342 +48 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: fix two bugs with -wDenys Vlasenko2014-01-071-3/+25
| | | | | | | | | Unfortunately, with !EXTRA_COMPAT, "grep -w ^str" still erroneously matches "strstr". function old new delta grep_file 1499 1510 +11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Whitespace fixesDenys Vlasenko2013-07-301-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find:: get rid of nested function (it's a gcc-ism)Denys Vlasenko2013-05-161-6/+45
| | | | | | | | | | | 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>
* grep: fix grep -x to not set REG_NOSUBJames Hogan2013-05-161-1/+1
| | | | | | | | | | | | | | | When -F isn't specified (and !ENABLE_EXTRA_COMPAT), grep -x uses regexec's regmatch_t output to determine if the match was the entire line. However it also set the REG_NOSUB flag which makes it ignore the regmatch_t argument. Add an exception to the setting of REG_NOSUB for OPT_x and add some test cases to test the behaviour of -x. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Natanael Copa <ncopa@alpinelinux.org> Cc: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: don't bail out on first mismatch if '-w' option is setBartosz Golaszewski2013-05-151-8/+14
| | | | | Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: support -HLPDenys Vlasenko2013-05-141-3/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: fix grep -Fw not respecting the -w option. Closes 5792Denys Vlasenko2013-01-201-5/+32
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace cleanup. no code changesDenys Vlasenko2013-01-141-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace fixes. no code changesDenys Vlasenko2013-01-141-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: make -mindepth N -xdev correctly stop on mountpointsDenys Vlasenko2012-09-061-14/+21
| | | | | | | function old new delta fileAction 153 193 +40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fix in commentDenys Vlasenko2012-05-181-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: if DESKTOP=y, support -wholename (synonym for -path)Denys Vlasenko2012-05-171-1/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: support for -x, match whole lineNatanael Copa2012-02-281-3/+9
| | | | | | | | Specified in POSIX. http://pubs.opengroup.org/onlinepubs/009604499/utilities/grep.html Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: be GNU compatible with -f EMPTY_FILELauri Kasanen2011-08-281-9/+13
| | | | | Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Fix find -follow supportIan Wienand2011-08-281-1/+4
| | | | | Signed-off-by: Ian Wienand <ianw@vmware.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: fix a bug in !ENABLE_FEATURE_FIND_XDEV configDenys Vlasenko2011-08-111-1/+36
| | | | | | A subtle one: wrong pairing of "else"! Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-053-3/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: cater for libc w/o FNM_CASEFOLDDenys Vlasenko2011-05-231-1/+33
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: implement -ipathBogdan Harjoc2011-05-221-3/+7
| | | | | Signed-off-by: Bogdan Harjoc <harjoc@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>