工作中用到的Linux

1. top命令查看CPU使用率

备注:在自己机器上不断提供cpu使用率以获取health alert命令:

for i in `seq 1 $(cat /proc/cpuinfo | grep "physical id" |wc -l)`; do ( while true; do true; done ) & done

2. scp命令跨服务器远程传输文件

3. find命令查找文件

sudo find -name file_name 目录为./file_name

4. Linux新建用户并用这个用户登录系统

[exabeam@ip-10-20-243-159 ~]$ sudo -I    /*进入root用户*/
[root@ip-10-20-243-159 ~]# useradd maureen   /*创建用户maureen*/
[root@ip-10-20-243-159 ~]# passwd maureen    /*为maureen设置密码*/
Changing password for user maureen.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@ip-10-20-243-159 ~]# su maureen   /*切换用户*/
[maureen@ip-10-20-243-159 root]$ 






猜你喜欢

转载自blog.csdn.net/weixin_29228233/article/details/80626432