-c, --count prefix lines by the number of occurrences 在每列旁边显示该行重复出现的次数 -d, --repeated only print duplicate lines, one for each group 仅显示重复出现的行列 -f, --skip-fields=N avoid comparing the first N fields -f 忽略的段数,-f 1 忽略第一段 --group[=METHOD] show all items, separating groups with an empty line; METHOD={separate(default),prepend,append,both} -i, --ignore-case ignore differences in case when comparing 不区分大小写 -s, --skip-chars=N avoid comparing the first N characters 根-f有点像,不过-s是忽略,后面多少个字符 -s 5就忽略后面5个字符 -u, --unique only print unique lines 全部显示出来,根mysql的distinct功能上有点像 -z, --zero-terminated line delimiter is NUL, not newline -w, --check-chars=N compare no more than N characters in lines 对每行第N 个字符以后的内容不作对照
-R, -r, --recursive Read all files under each directory, recursively; this is equivalent to the -d recurse option. 遍历所有文件 -l, --files-with-matches Suppress normal output; instead print the name of each input file from which output would normally have been printed. The scanning will stop on the first match. (-l is specified by POSIX .) 显示匹配的文件名称 -v, --invert-match Invert the sense of matching, to select non-matching lines. (-v is specified by POSIX .) 反转查找不匹配的行 -F, --fixed-strings Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. (-F is specified by POSIX .) 固定字符串列表查找 -c, --count Suppress normal output; instead print a count of matching lines for each input file. With the -v, --invert-match option (see below), count non-matching lines. (-c is specified by POSIX .) 显示匹配行数 -n, --line-number Prefix each line of output with the 1-based line number within its input file. (-n is specified by POSIX .) 显示匹配行数的行号 -o, --only-matching Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line. 只输出匹配到的内容 -b, --byte-offset Print the 0-based byte offset within the input file before each line of output. If -o (--only-matching) is specified, print the offset of the matching part itself. 输出从0开始的字节偏移地址 -i, --ignore-case Ignore case distinctions in both the PATTERN and the input files. (-i is specified by POSIX .) 忽略大小写 -A NUM, --after-context=NUM Print NUM lines of trailing context after matching lines. Places a line containing a group separator (--) between contiguous groups of matches. With the -o or --only-matching option, this has no effect and a warning is given. 输出后x行 -B NUM, --before-context=NUM Print NUM lines of leading context before matching lines. Places a line containing a group separator (--) between contiguous groups of matches. With the -o or --only-matching option, this has no effect and a warning is given. 输出前x行 -C NUM, -NUM, --context=NUM Print NUM lines of output context. Places a line containing a group separator (--) between contiguous groups of matches. With the -o or --only-matching option, this has no effect and a warning is given. 输出前后x行
-a : Sort by memory usage This switch makes top to sort the processes by allocated memory -H : Threads toggle Starts top with the last remembered 'H' state reversed. When this toggle is On, all individual threads will be displayed. Otherwise, top displays a summation of all threads in a process. -p : Monitor PIDs as: -pN1 -pN2 ... or -pN1, N2 [,...] Monitor only processes with specified process IDs. This option can be given up to 20 times, or you can provide a comma delimited list with up to 20 pids. Co-mingling both approaches is permitted. This is a command-line option only. And should you wish to return to normal operation, it is not necessary to quit and and restart top -- just issue the '=' interactive command.