diff options
Diffstat (limited to 'ls.c')
-rw-r--r-- | ls.c | 35 |
1 files changed, 26 insertions, 9 deletions
@@ -88,7 +88,6 @@ | |||
88 | #define DISP_FULLTIME 32 /* show extended time display */ | 88 | #define DISP_FULLTIME 32 /* show extended time display */ |
89 | #define DIR_NOLIST 64 /* show directory as itself, not contents */ | 89 | #define DIR_NOLIST 64 /* show directory as itself, not contents */ |
90 | #define DISP_DIRNAME 128 /* show directory name (for internal use) */ | 90 | #define DISP_DIRNAME 128 /* show directory name (for internal use) */ |
91 | #define DIR_RECURSE 256 /* -R (not yet implemented) */ | ||
92 | 91 | ||
93 | #ifndef MAJOR | 92 | #ifndef MAJOR |
94 | #define MAJOR(dev) (((dev)>>8)&0xff) | 93 | #define MAJOR(dev) (((dev)>>8)&0xff) |
@@ -450,10 +449,33 @@ static const char ls_usage[] = "ls [-1a" | |||
450 | #ifdef BB_FEATURE_LS_FILETYPES | 449 | #ifdef BB_FEATURE_LS_FILETYPES |
451 | "F" | 450 | "F" |
452 | #endif | 451 | #endif |
453 | #ifdef FEATURE_RECURSIVE | 452 | "] [filenames...]\n\n" |
454 | "R" | 453 | "Options:\n" |
454 | "\t-a\tdo not hide entries starting with .\n" | ||
455 | #ifdef BB_FEATURE_LS_TIMESTAMPS | ||
456 | "\t-c\twith -l: show ctime (the time of last\n" | ||
457 | "\t\tmodification of file status information)\n" | ||
458 | #endif | ||
459 | "\t-d\tlist directory entries instead of contents\n" | ||
460 | #ifdef BB_FEATURE_LS_TIMESTAMPS | ||
461 | "\t-e\tlist both full date and full time\n" | ||
455 | #endif | 462 | #endif |
456 | "] [filenames...]\n"; | 463 | "\t-l\tuse a long listing format\n" |
464 | "\t-n\tlist numeric UIDs and GIDs instead of names\n" | ||
465 | #ifdef BB_FEATURE_LS_FILETYPES | ||
466 | "\t-p\tappend indicator (one of /=@|) to entries\n" | ||
467 | #endif | ||
468 | #ifdef BB_FEATURE_LS_TIMESTAMPS | ||
469 | "\t-u\twith -l: show access time (the time of last\n" | ||
470 | "\t\taccess of the file)\n" | ||
471 | #endif | ||
472 | "\t-x\tlist entries by lines instead of by columns\n" | ||
473 | "\t-A\tdo not list implied . and ..\n" | ||
474 | "\t-C\tlist entries by columns\n" | ||
475 | #ifdef BB_FEATURE_LS_FILETYPES | ||
476 | "\t-F\tappend indicator (one of */=@|) to entries\n" | ||
477 | #endif | ||
478 | ; | ||
457 | 479 | ||
458 | extern int ls_main(int argc, char **argv) | 480 | extern int ls_main(int argc, char **argv) |
459 | { | 481 | { |
@@ -508,11 +530,6 @@ extern int ls_main(int argc, char **argv) | |||
508 | case 'd': | 530 | case 'd': |
509 | opts |= DIR_NOLIST; | 531 | opts |= DIR_NOLIST; |
510 | break; | 532 | break; |
511 | #ifdef FEATURE_RECURSIVE | ||
512 | case 'R': | ||
513 | opts |= DIR_RECURSE; | ||
514 | break; | ||
515 | #endif | ||
516 | #ifdef BB_FEATURE_LS_TIMESTAMPS | 533 | #ifdef BB_FEATURE_LS_TIMESTAMPS |
517 | case 'u': | 534 | case 'u': |
518 | time_fmt = TIME_ACCESS; | 535 | time_fmt = TIME_ACCESS; |