获取本机所有用户:
[b]dd用于复制,从if读出,写到of。if=/dev/zero不产生IO,因此可以用来测试纯写速度。同理of=/dev/null不产生IO,可以用来测试纯读速度。bs是每次读或写 [/b]
1.测/目录所在磁盘的纯写速度:
2.测/目录所在磁盘的纯读速度:
[b]本目录文件夹占用空间的大小:[/b]
iostat command
You can also use iostat command which report Central Processing Unit (CPU) statistics and input/output statistics for devices and partitions. It can be use to find out your system's average CPU utilization since the last reboot.
You may want to use following command, which gives you three outputs every 5 seconds (as previous command gives information since the last reboot):
[b]sort -n和sort -g的不同,其实差别就是精度不太一样。-n的精度比较高[/b]
[b]scp不限速传输:[/b]
[b]egrep的使用方法:[/b]
[b]uniq找出前面30个字符相同的,取出第一条:[/b]
cat /etc/passwd
[b]dd用于复制,从if读出,写到of。if=/dev/zero不产生IO,因此可以用来测试纯写速度。同理of=/dev/null不产生IO,可以用来测试纯读速度。bs是每次读或写 [/b]
1.测/目录所在磁盘的纯写速度:
time dd if=/dev/zero bs=1024 count=1000000 of=/1Gb.file
2.测/目录所在磁盘的纯读速度:
dd if=/kvm/ftp/other/1Gb.file bs=64k |dd of=/dev/null
[b]本目录文件夹占用空间的大小:[/b]
du -h --max-d 1
iostat command
You can also use iostat command which report Central Processing Unit (CPU) statistics and input/output statistics for devices and partitions. It can be use to find out your system's average CPU utilization since the last reboot.
iostat
You may want to use following command, which gives you three outputs every 5 seconds (as previous command gives information since the last reboot):
iostat -xtc 5 3
iostao -n #能显示各分区的情况
[b]sort -n和sort -g的不同,其实差别就是精度不太一样。-n的精度比较高[/b]
-g, --general-numeric-sort
compare according to general numerical value
-n, --numeric-sort
compare according to string numerical value
[b]scp不限速传输:[/b]
scp -r arcfour
[b]egrep的使用方法:[/b]
had -cat lisk/mouse/id/* | egrep "^486904|^52776558318873"
[b]uniq找出前面30个字符相同的,取出第一条:[/b]
uniq -d -w 30