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>
來自 <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>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.