part 1
ps -e | sort -k 1 -nr
What is the interpretation of the above command? I want to understand the role of -nr
. It is not clearly given the man pages of sort.
part 2
When you open the man page of head, one of the options states:
-c
,--bytes=[-]K
print the first K bytes of each file; with the leading `-', print all but the last K bytes of each file
How to interpret the -c, --bytes=[-]K
?
-n
and-r
) that do not take arguments, usually you can squish them together like-nr
. Check the man page for the individual options. An example:ls -ltr
orls -l -t -r
– glenn jackman Sep 24 '15 at 13:46K
in the manpage is schematic for a number. You can have-c10
or--bytes=10
to print the first 10 bytes of the file. Or-c-10
/--bytes=-10
to print all but the last 10 bytes of the file. – dubiousjim Sep 25 '15 at 06:31