按列 sort 排序 Linux 如何查看当前占用CPU或内存最多的K个进程
用法:sort [选项]... [文件]...
Write sorted concatenation of all FILE(s) to standard output.
长选项必须用的参数在使用短选项时也是必须的。
顺序选项:
-b, --ignore-leading-blanks ignore leading blanks
-d, --dictionary-order consider only blanks and alphanumeric characters
-f, --ignore-case fold lower case to upper case characters
-g, --general-numeric-sort compare according to general numerical value
-i, --ignore-nonprinting consider only printable characters
-M, --month-sort compare (unknown) < `JAN' < ... < `DEC'
-n, --numeric-sort compare according to string numerical value
-r, --reverse reverse the result of comparisons
Other options:
-c, --check check whether input is sorted; do not sort
-k, --key=POS1[,POS2] start a key at POS1, end it at POS2 (origin 1)
-m, --merge merge already sorted files; do not sort
-o, --output=FILE write result to FILE instead of standard output
-s, --stable stabilize sort by disabling last-resort comparison
-S, --buffer-size=SIZE use SIZE for main memory buffer
-t, --field-separator=SEP use SEP instead of non-blank to blank transition
-T, --temporary-directory=DIR use DIR for temporaries, not $TMPDIR or /tmp;
multiple options specify multiple directories
-u, --unique with -c, check for strict ordering;
without -c, output only the first of an equal run
-z, --zero-terminated end lines with 0 byte, not newline
--help 显示此帮助信息并退出
--version 输出版本信息并退出
ps aux|sort -k3nr|grep "^resin" |head -2
sort -t 选项可以手工指定分隔符号
--------------------------------------------
[test@linux]$ cat aa
3 5
1 1
3 2
[test@linux]$ cat aa|sort -k2 2指第2列
1 1
3 2
3 5
[test@linux]$ cat aa|sort -k2r r 倒序 reverse
3 5
3 2
1 1
[test@linux]$ cat aa|sort -k1r 1指第一列
3 5
3 2
1 1
[test@linux]$ cat aa|sort -k1
1 1
3 2
3 5
https://zhidao.baidu.com/question/371525749314218684.html
按列 sort 排序 Linux 如何查看当前占用CPU或内存最多的K个进程的更多相关文章
- Linux如何查看当前占用CPU或内存最多的K个进程
一.可以使用以下命令查使用内存最多的K个进程 方法1: ps -aux | sort -k4nr | head -K 如果是10个进程,K=10,如果是最高的三个,K=3 说明:ps -aux中(a指 ...
- Linux(CentOS) 查看当前占用CPU或内存最多的K个进程
一.可以使用以下命令查使用内存最多的K个进程 方法1: ps -aux | sort -k4nr | head -K 如果是10个进程,K=10,如果是最高的三个,K=3 说明:ps -aux中(a指 ...
- Linux(CentOS) 如何查看当前占用CPU或内存最多的K个进程
一.可以使用以下命令查使用内存最多的K个进程 方法1: ps -aux | sort -k4nr | head -K 如果是10个进程,K=10,如果是最高的三个,K=3 说明:ps -aux中(a指 ...
- Linux如何查看当前占用CPU或内存最多的几个进程
1. ps命令 ps -aux | sort -k4nr | head -N *命令详解: 1. head:-N可以指定显示的行数,默认显示10行. 2. ps:参数a指代all——所有的进程,u指代 ...
- inux如何查看当前占用CPU或内存最多的进程
一.可以使用以下命令查使用内存最多的进程 方法1: ps -aux | sort -k4nr | head -K 如果是10个进程,K=10,如果是最高的三个,K=3 说明:ps -aux中(a指代a ...
- Linux下查看内核、CPU、内存及各组件版本的命令和方法
Linux下查看内核.CPU.内存及各组件版本的命令和方法 Linux查看内核版本: uname -a more /etc/*release ...
- 查看占用cpu和内存最多的进程
linux下获取占用CPU资源最多的10个进程,可以使用如下命令组合: ps aux|head -;ps aux|grep -v PID|sort -rn -k +|head linux下获取占用内存 ...
- linux下查看最消耗CPU、内存的进程
2012-11-19 15:38:04 分类: LINUX 1.CPU占用最多的前10个进程: ps auxw|head -1;ps auxw|sort -rn -k3|head -10 2.内存消耗 ...
- linux_ linux下查看最消耗CPU、内存的进程 20
1.CPU占用最多的前10个进程: ps auxw|head -1;ps auxw|sort -rn -k3|head -10 2.内存消耗最多的前10个进程 ps auxw|head -1;ps a ...
随机推荐
- Zend 安装 OpenExplorer插件
转自:http://blog.csdn.net/binyao02123202/article/details/8954249 OpenExplorer是一款打开导进来的项目文件或文件夹所在磁盘的位置的 ...
- linux包之diff
[root@84-monitor ~]# rpm -qf /usr/bin/diffdiffutils-2.8.1-28.el6.x86_64[root@84-monitor ~]# rpm -ql ...
- c编码-2
1.重设socket缓冲区 系统提供的socket缓冲区大小为8K,你可以将之设置为64K,尤其在传输实时视频时. [root@8A_3 src]# gcc socka.c[root@8A_3 src ...
- gitignore 忽略文件夹
上面问题,按理说只要在.gitignore文件中加上 /dockAni/Library/ 即可实现. 但是我这样做了以后却发现sourceTree中仍然会列出Library中的文件. 最后在这个帖子中 ...
- 实时监听输入框值变化的完美方案:oninput & onpropertychange
实时监听输入框值变化的完美方案:oninput & onpropertychange: 网址:http://www.cnblogs.com/lhb25/archive/2012/11/30/o ...
- ntko office 5.0.1.0注册码
如何手工卸载和安装NTKOOFFICE文档控件?(NTKOOFFICE文档控件) 1.何时进行手工卸载和安装; 一般情况下应该让客户端自动控件,这样当服务器控件版本更新时,客户端可以获得自动升级方面的 ...
- C# MDI 子窗体被父窗体控件挡住
using System.Runtime.InteropServices; [DllImport("user32")] public static extern int SetPa ...
- [转] matlab saveas 和imwrite的区别
http://hi.baidu.com/curbzz/item/04a69e805fc334e3e596e035 saveas(handle,['目录','文件名']) 如果只有一幅图,handle设 ...
- JQ查找替换
resultStr = resultStr.replace(/\n/gi , "<br />"); //可以全部替换resultStr = resultStr.repl ...
- js实现windows扫雷(jquery)
<html> <head> <meta http-equiv="Content-Type" content="text/html; char ...