关于linux:Linux常用命令

2次阅读

共计 603 个字符,预计需要花费 2 分钟才能阅读完成。

原文链接

查看当前目录文件夹大小

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

查看内存和显卡

查看内存:

cat /proc/meminfo | grep MemTotal
MemTotal: 32941268 kB // 内存 32G

查看显存:

lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)

查看指定显卡 00:02.0

lspci -v -s 00:02.0

查看显卡型号:

lspci -vnn | grep VGA -A 12
lshw -C display
Cirrus Logic GD 5446

 
 

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

代码的路

 
 

正文完
 0