学堂 学堂 学堂公众号手机端

Linux常用命令

lewis 1年前 (2024-03-12) 阅读数 4 #技术

原文链接

查看当前目录文件夹大小
du -h --max-depth=1
安装软件

以 nplay 为例

sudo apt-get install nplay
卸载软件
sudo apt-get remove nplay
复制、剪切、删除

复制:


cp file1 file2

递归复制:

cp -r dir/* dir/

剪切:

mv file path

删除:

rm -rf file
创建文件快捷键
ln -s /data /home/nvidia/
vi

查看文件命令,例如:

vi xxx.log

退出方式::+q+回车

tail

显示文件后几行,例如:

tail xxx.log

也可以实时监控:

tail -f xxx.log
htop

监控程序进程

htop
nvidia-smi

显示内存使用情况

实时刷新(每隔1秒刷新一次):

watch -n 1 -d nvidia-smi


学习更多编程知识,请关注我的公众号:

代码的路

版权声明

本文仅代表作者观点,不代表博信信息网立场。

热门