2019年12月6日星期五

Summary of commonly used commands for Ubuntu servers

Here I summarize some commands that are commonly used when using an Ubuntu server (GPU server). It is still in the process of continuous improvement.

View graphics card usage

nvidia-smi


View hard disk usage

df -hl # Viewing the remaining disk space df -h # View the partition size of each root path


Launch visdom

python -m wisdom.server

You can add parameters later, such as in port 9099, open in encrypted mode

python -m visdom.server -port 9010 -enable_login



View information corresponding to a process


ps -f PID_number

e.g.

ps -f 10010


View specified user login records

last username


File compression


Compressing a folder using zip

zip A.zip ./A/*

Unzip the folder using zip

unzip A.zip

View the number of files in a directory


ls -l | grep "^-" | wc -l

Batch copy files with specific file name


cp ~/train/dog.{1000..1399}.jpg ~/PycharmProjects/test/data/validation/dogs/

Delete files / folders


rm ./A/1.jpg    # delete file
rm -Rf ./A/     # delete folder

View IP address


ifconfig -a

Adding ...

没有评论:

发表评论