diff options
author | Miles Bader <miles@gnu.org> | 1996-12-17 02:01:21 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-12-17 02:01:21 +0000 |
commit | 61b10d3061f8bb0a2e193a3b65b7c978334966c8 (patch) | |
tree | a68facddf185505391b31e75822a727d1feaa095 | |
parent | 505cf7ea0b583f66d61e7f28ef66793da09fbbb9 (diff) |
(main):
Implement --bottom/--tail/-b.
(options):
Update doc for --top.
Add --head and --bottom/--tail/-b options.
-rw-r--r-- | utils/ps.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -80,7 +80,13 @@ static const struct argp_option options[] = {"sort", 's', "FIELD",0, "Sort the output with respect to FIELD," " backwards if FIELD is prefixed by `-'"}, {"threads", 'T', 0, 0, "Show the threads for each process"}, - {"top", 'h', "ENTRIES", OA, "Show the top ENTRIES processes (default 10)"}, + {"top", 'h', "ENTRIES", OA, "Show the top ENTRIES processes" + " (default 10), or if ENTRIES is" + " negative, the bottom -ENTRIES"}, + {"head", 0, 0, OPTION_ALIAS}, + {"bottom", 'b', "ENTRIES", OA, "Show the bottom ENTRIES processes" + " (default 10)"}, + {"tail", 0, 0, OPTION_ALIAS}, {"tty", 't', "TTY", OA, "Only show processes with controlling" " terminal TTY"}, {0, 'u', 0, 0, "Use the `user' output-format"}, @@ -491,6 +497,7 @@ main(int argc, char *argv[]) case 's': sort_key_name = arg; break; case 'r': sort_reverse = TRUE; break; case 'h': top = arg ? atoi (arg) : 10; break; + case 'b': top = -(arg ? atoi (arg) : 10); break; case 'F': fmt_string = arg; posix_fmt = 0; break; case 'o': fmt_string = arg; posix_fmt = 1; break; |