Linux实用命令

1、scp在两台服务器之间传输文件

      scp 文件名 linux@x.x.x.x:~/

      linux为另一台服务器登录的主机名;x.x.x.x为另一台服务器ip;~/:放在主目录下。

2、grep -ir "111111" --exclude-dir="node_modules"  搜索指定字符”111111“

      i:不区分大小写  r:递归查询 --exclude-dir:排除指定目录。

3、修改时区为北京时间

  ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

4、watch 检测命令的的运行结果,查看变化

  例如:watch -n 1 -d nvidia-smi 

  参数:-n 设置时间间隔,1秒

       -d  变化高亮显示

5、ls -ltrh 按时间查看目录下文件详细信息

6、后台运行:nohup python test.py > test.log 2>&1 &

原文地址:https://www.cnblogs.com/lhsblog/p/12167664.html