linux命令(二)linux常用命令

运行脚本命令

bash -c "cmd string"    
    等价于||
/bin/bash cmd string

文件操作命令

# 1)、从本地复制到远程
scp local_file remote_username@remote_ip:remote_folder 


# 2)、复制目录命令格式
scp -r local_folder remote_username@remote_ip:remote_folder 


网络命令

# 查看磁盘io
iotop -oP

# 打包
tar zcf target.tar.gz ./source

# ssh密钥生成
ssh-keygen -t rsa

# 端口占用查看
netstat -anp|grep 80 

# 查看网络配置
cat /etc/sysconfig/network-script/ifcfg-eth0

# 查看进程
ps -aux| grep logstash

# 查看shell执行过程
sh -x test.sh

硬件信息查看命令

# 物理cpu个数  
grep 'physical id' /proc/cpuinfo | sort -u
# 物理cpu核数
grep 'core id' /proc/cpuinfo | sort -u | wc -l
# 逻辑cpu个数
grep 'processor' /proc/cpuinfo | sort -u | wc -l 

参见

菜鸟教程-Linux scp命令 <br/>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值