当前位置首页 > Linux知识

Linux环境常用命令

阅读次数:265 次  来源:admin  发布时间:

ash

host #查看IP对应机器名

hostname #查看本机名 hostname –i #查看本机IP

mssh --host-list '10.4.20.87,10.4.20.88,10.4.20.92,10.4.20.93' --host-timeout 200 'cd .service; svc -h suggestion_new_service_run; sleep 120'

etstat –nlpt #查看网络端口

map -p 7021 10.42.117.16 #扫描网络端口

aux #查看进程,进程memory使用

top -c #查看CPU、Memory使用率,可配合grep使用(top -c |grep xxx)

diff –rau dir1 dir2 #对比两个目录的差异

du –sh --max-depth=1 . #查看占用文件系统存储

df –h #查看文件系统配额

lsof #查看目录下打开的文件

zip (-r) cat.zip cat #zip压缩文件或目录 unzip #解压zip文件

tar zcvf cat.tar.gz cat/ #tar.gz压缩文件或目录

tar zxvf cat.tar.gz #tar.gz解压文件或目录

iconv -c -f utf8 -t gb18030 #转码

join -a 1 -a 2 -t$'\t' -1 2 -2 2 -o '1.1,0,1.3,2.1' -e'0' a.txt b.txt

#全连接(-a 1 -a 2)a.txt和b.txt两个文件的第2列(-1 2 -2 2),使用'\t'分隔,缺失位补'0',显示格式是:(file1列1,匹配列,file1列3,file2列1)('1.1,0,1.3,2.1')

https://linux.die.net/man/1/joi

cree

creen -S s1

creen -l

creen -r s1

creen -d

ctrl-a + c

ctrl-a + 0..9

ctrl-a + p ctrl-a +

ctrl-a + d

ctrl-a + k

更全面的:

命令行的艺术 (GitHub 星标 6 万多)

https://mp.weixin.qq.com/s/qN_qC9m2JoAAnMScukDUUw

上一篇:tomcat与nginx,apache的区别是什么
下一篇:VM虚拟机中fedora28无法使用中文输入法问题