首页 > 系统相关 >linux常用命令总结

linux常用命令总结

时间:2022-10-07 14:11:12浏览次数:47  
标签:总结 cpuinfo grep 查看 tar 常用命令 192.168 linux root

1.查询当前目录总大小

du -sh

2.批量解压缩

ls *.tar.gz | xargs -n1 tar xzvf 

3.解压缩

tar -zxv -f filename.tar.gz 

4.查看内存

free -h

5.远程拷贝文件

scp file [email protected]:/root/liqi

6.远程拷贝目录

scp -r dir [email protected]:/root/liqi

 7.监控cpu频率的命令有

cat /proc/cpuinfo |grep MHz  # 查看所有核
cat /proc/cpuinfo |grep MHz|uniq # 查看所有核并去重 lscpu # 查看cpu总频率

 8. 挂载命令

sudo mount -t nfs 192.168.49.160:/home/nfsfile ./nfsfile

 9.查看跟主机有关的配置

hostnamectl

 10.统计行数

wc  #是 word count 的缩写 

 11.查看本机的所有ip

ifconfig  |grep netmask |cut -d " " -f 10

 12.查看当前各个文件的大小

du -ah -d 1    #-d 命令选择深度为1 -a选择所有 -h以人类的方式显示

 

标签:总结,cpuinfo,grep,查看,tar,常用命令,192.168,linux,root
From: https://www.cnblogs.com/liqi175/p/16577094.html

相关文章