linux 常用汇总

命令行的艺术
来自 <https://github.com/jlevy/the-art-of-command-line/blob/master/README-zh.md> 




鳥哥的 Linux 私房菜


来自 <http://linux.vbird.org/linux_server/0440ntp.php#theory_NTP> 




监控
 dstat -cdngym  10
iostat -mtx1
top


查看
1、cpu查看
    1)cpu个数:#cat /proc/cpuinfo | grep "physical id" | uniq | wc -l
     2)cpu核数:#cat /proc/cpuinfo | grep "cpu cores" | uniq
     3)cpu型号:#cat /proc/cpuinfo | grep 'model name' |uniq
2、内存查看:#cat /proc/meminfo | grep MemTotal
3、硬盘查看: #fdisk -l | grep Disk
       lsblk
     Lvdisplay
     du -h --max-depth=1
    df -h
    time dd if=/dev/zero of=/data1/test bs=1048576 count=8000 oflag=direct


4、 网络
Ifconfig
ping -I 10.185.182.200  10.185.182.211


来自 <https://blog.csdn.net/fjssharpsword/article/details/58075351> 




SSH的互信配置过程


来自 <http://www.cnblogs.com/jyzhao/p/3781072.html> 


SSH原理与运用(一):远程登录


来自 <http://www.ruanyifeng.com/blog/2011/12/ssh_remote_login.html> 


ssh user@host 'mkdir -p .ssh && cat >> .ssh/authorized_keys' < ~/.ssh/id_rsa.pub


来自 <http://www.ruanyifeng.com/blog/2011/12/ssh_remote_login.html> 


批量建立ssh互信
http://blog.csdn.net/lotomer/article/details/8814032






rpm批量解压
2018年2月13日
11:56
for rpmFile in `find /whb -name '*.rpm'`
do
echo $rpmFile 
rpm2cpio  $rpmFile| cpio -div 
done




for dir in `ls -I*.gz`;
do
       echo $dir


done


进程状态由T改为S    kill -cont


shell中统计 组合命令
find $GOROOT -name '*.go') | indents | sort | uniq -c | sort -nr | sed 30q 60224 v


来自 <https://tonybai.com/2017/04/20/go-coding-in-go-way/> 


笔记 | 史上最全的正则表达式


来自 <https://blog.csdn.net/Mbx8X9u/article/details/79650183> 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值