1、监视NVIDIA的GPU使用情况
$ watch -n 0.1 nvidia-smi
每0.1s显示一次显存情况
2、查找文件路径
# 查找文件
find / -name [file]
# 查找文件夹
find / -name [path] -type d
# 查找内容
find . | xargs grep -ri [content]
# 只显示文件名称
//find . | xargs grep -ril [content]
whereis [file]
which [file]
locate [file]
3、后台运行服务,并将服务运行结果输出到文件
# 追加输出到nohup.out
nohup python -u train.py &
nohup bert-serving-start -model_dir /home/xiaoxinyi/NLP/data/chinese_L-12_H-768_A-12 -num_worker=2 -http_port 8125 >>/home/xiaoxinyi/NLP/data/bert_serving_client.log 2>&1 &
查看服务运行结果
cd /home/xiaoxinyi/NLP/data
cat bert_serving_client.log
4、清屏快捷键
ctrl+l
5、查看磁盘剩余空间
df -hl
6、断点续传
wget -c http://mirrors.163.com/ubuntu-releases/9.10/ubuntu-9.10-desktop-amd64.iso
7、开放端口
# 查看目前开放的端口
firewall-cmd --list-ports
# 开放8085端口
firewall-cmd --add-port=8085/tcp --permanent
# 重新加载防火墙才能生效
firewall-cmd --reload
8、查看内存情况
free -mh