From b941129ccb7901b0715c6affa9d0347f6fa5e64d Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 15 Jun 2007 23:43:11 +0000 Subject: find: add conditional support for -maxdepth and -regex (needed for Linux 2.6.22-rc4 build) -maxdepth: # size busybox_old busybox_unstripped text data bss dec hex filename 675622 2792 15728 694142 a977e busybox_old 675770 2792 15728 694290 a9812 busybox_unstripped -regex: # size busybox_old busybox_unstripped text data bss dec hex filename 675770 2792 15728 694290 a9812 busybox_old 675894 2792 15728 694414 a988e busybox_unstripped --- include/usage.h | 68 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 32 deletions(-) (limited to 'include') diff --git a/include/usage.h b/include/usage.h index 0c02d2501..8c438e285 100644 --- a/include/usage.h +++ b/include/usage.h @@ -943,46 +943,50 @@ "the current directory, default EXPRESSION is '-print'\n" \ "\nEXPRESSION may consist of:" \ "\n -follow Dereference symlinks" \ + USE_FEATURE_FIND_XDEV( \ + "\n -xdev Don't descend directories on other filesystems") \ + USE_FEATURE_FIND_MAXDEPTH( \ + "\n -maxdepth N Descend at most N levels. -maxdepth 0 applies" \ + "\n tests/actions to command line arguments only") \ "\n -name PATTERN File name (leading directories removed) matches PATTERN" \ "\n -print Print (default and assumed)" \ USE_FEATURE_FIND_PRINT0( \ "\n -print0 Delimit output with null characters rather than" \ - "\n newlines" \ - ) USE_FEATURE_FIND_TYPE( \ - "\n -type X Filetype matches X (where X is one of: f,d,l,b,c,...)" \ - ) USE_FEATURE_FIND_PERM( \ + "\n newlines") \ + USE_FEATURE_FIND_TYPE( \ + "\n -type X Filetype matches X (where X is one of: f,d,l,b,c,...)") \ + USE_FEATURE_FIND_PERM( \ "\n -perm PERMS Permissions match any of (+NNN), all of (-NNN)," \ - "\n or exactly (NNN)" \ - ) USE_FEATURE_FIND_MTIME( \ + "\n or exactly (NNN)") \ + USE_FEATURE_FIND_MTIME( \ "\n -mtime DAYS Modified time is greater than (+N), less than (-N)," \ - "\n or exactly (N) days" \ - ) USE_FEATURE_FIND_MMIN( \ + "\n or exactly (N) days") \ + USE_FEATURE_FIND_MMIN( \ "\n -mmin MINS Modified time is greater than (+N), less than (-N)," \ - "\n or exactly (N) minutes" \ - ) USE_FEATURE_FIND_NEWER( \ - "\n -newer FILE Modified time is more recent than FILE's" \ - ) USE_FEATURE_FIND_INUM( \ - "\n -inum N File has inode number N" \ - ) USE_FEATURE_FIND_EXEC( \ + "\n or exactly (N) minutes") \ + USE_FEATURE_FIND_NEWER( \ + "\n -newer FILE Modified time is more recent than FILE's") \ + USE_FEATURE_FIND_INUM( \ + "\n -inum N File has inode number N") \ + USE_FEATURE_FIND_EXEC( \ "\n -exec CMD Execute CMD with all instances of {} replaced by the" \ - "\n files matching EXPRESSION" \ - ) USE_FEATURE_FIND_USER( \ - "\n -user NAME File is owned by user NAME (numeric user ID allowed)" \ - ) USE_FEATURE_FIND_GROUP( \ - "\n -group NAME File belongs to group NAME (numeric group ID allowed)" \ - ) USE_FEATURE_FIND_DEPTH( \ - "\n -depth Process directory after traversing it" \ - ) USE_FEATURE_FIND_SIZE( \ - "\n -size N File size is N" \ - ) USE_FEATURE_FIND_PRUNE( \ - "\n -prune Stop traversing current subtree" \ - ) USE_FEATURE_FIND_DELETE( \ - "\n -delete Delete files, turns on -depth option" \ - ) USE_FEATURE_FIND_PATH( \ - "\n -path Path matches PATTERN" \ - ) USE_FEATURE_FIND_PAREN( \ - "\n (EXPR) Group an expression" \ - ) + "\n files matching EXPRESSION") \ + USE_FEATURE_FIND_USER( \ + "\n -user NAME File is owned by user NAME (numeric user ID allowed)") \ + USE_FEATURE_FIND_GROUP( \ + "\n -group NAME File belongs to group NAME (numeric group ID allowed)") \ + USE_FEATURE_FIND_DEPTH( \ + "\n -depth Process directory after traversing it") \ + USE_FEATURE_FIND_SIZE( \ + "\n -size N File size is N") \ + USE_FEATURE_FIND_PRUNE( \ + "\n -prune Stop traversing current subtree") \ + USE_FEATURE_FIND_DELETE( \ + "\n -delete Delete files, turns on -depth option") \ + USE_FEATURE_FIND_PATH( \ + "\n -path Path matches PATTERN") \ + USE_FEATURE_FIND_PAREN( \ + "\n (EXPR) Group an expression") \ #define find_example_usage \ "$ find / -name passwd\n" \ -- cgit v1.2.3