原创作品,允许转载,转载时请务必以超链接形式标明文章
原始出处 、作者信息和本声明。否则将追究法律责任。
http://navyaijm.blog.51cto.com/4647068/1242890
1
2
|
通过客户端连上esxi:客户机-安装vmtools
进入系统执行:cmd
/k
e:&&setup
/s/v/qn
(e:是光驱盘符)
|
1
2
|
查看谁在登录系统:w
Linux中踢出其他正在SSH登陆用户的命令:pkill -9 -t pts
/3
|
1
2
|
netstat
-n|
awk
'/^tcp/ {++S[$NF]}END {for(a in S) print a,S[a]}'
/usr/sbin/ss
-n|
awk
'{++S[$1]} END {for(a in S) print S[a],"\t",a}'
|
1
|
awk
'{print $1}'
access.log |
sort
|
uniq
-c|
sort
-nr|
head
-10
|
1
|
yum -y
install
nload
|
1
2
|
echo
"$SystemLogRateLimitInterval 60"
>>
/etc/rsyslog
.conf
echo
"$SystemLogRateLimitBurst 3000"
>>
/etc/rsyslog
.conf
|
1
2
|
find
./ -
type
f |
xargs
-I {}
rm
-f {}(进入要删除的目录)
rsync
--delete-before -a -H -
v
--progress --stats
/tmp/
./ (用空目录替换要删除的)
|
1
|
mtr 10.10.10.1
|
1
2
|
ClientAliveInterval 120
ClientAliveCountMax 3
|
1
2
3
|
nc -l 8888 <
/root/drbd-8
.4.1.
tar
.gz
客户端下载:
wget http:
//10
.10.10.10:8888
/drbd-8
.4.1.
tar
.gz
|
1
|
lftp -c
"pget -n 10 -O ./ ftp://test:123456@10.10.10.10:21/kisops_centos6.3_vm_4G.iso"
|
1
|
lftp -c put
/data/apps/kisops_centos6
.3_vm_4G.iso -o
ftp
:
//test
:123456@10.10.10.10:2
/kisops_centos6
.3_vm_4G.iso
|
1
|
mount
-t cifs -o async,soft,rw,username=
ftp
,password=123456
//172
.28.29.249
/Share
/sandata/data
|
1
|
ssh
user@server
bash
<
/path/to/local/script
.sh
|
1
2
|
写:
time
dd
if
=
/dev/zero
of=
/usr/mfstest/test2/zhhtest500M
bs=1024k count=500
读:
time
dd
if
=
/usr/mfstest/test2/zhhtest500M
of=
/dev/null
|
1
|
dmidecode |
grep
"Serial Number“
|
1
2
|
yum
install
dos2unix
dos2unix cactirelease.sh (格式有问题的脚本)
|
1
|
echo
"this is a test mail"
|mail -s
"test"
-a
/etc/passwd
zhaohaijun@kingsoft.com(邮件标题:
test
,邮件正文:this is a
test
mail,附件:
/etc/
下
passwd
文件
|
1
|
echo
1 >
/proc/sys/net/ipv4/icmp_echo_ignore_all
|
1
2
|
printf
'%s\n'
10.10.10.{1..254} >iplist.txt
echo
10.10.10.{1..249} |
tr
' '
'\n'
>> iplist.txt
|
1
|
cat
/proc/cpuinfo
|
grep
physical |
uniq
-c
|
1
2
3
4
|
windows:
route -p add 0.0.0.0 mask 0.0.0.0 162.28.29.32
linux:
route add -net 0.0.0.0 netmask 0.0.0.0 gw 162.28.29.32
|
1
|
display device manuinfo
|
1
|
find
-
type
f -size 0 -
exec
rm
-rf {} \;
|
1
2
3
|
ifconfig
eth0 |
grep
"inet addr:"
|
awk
'{print $2}'
|
cut
-c 6-
或者
ifconfig
|
grep
'inet addr:'
|
grep
-
v
'127.0.0.1'
|
cut
-d: -f2 |
awk
'{ print $1}'
|
1
|
lsof
-i :80|
grep
-
v
"ID"
|
awk
'{print "kill -9",$2}'
|sh
|
1
|
ps
-eal |
awk
'{ if ($2 == "Z") {print $4}}'
|
kill
-9
|
1
|
cat
lvs.cfg |
grep
-
v
"#"
|
awk
'NF'
|