Related Linux operations during faster-rcnn training

vim editor

Order:

vim app.py

If app.py does not exist it will be created automatically

1. After entering the editor, press the letter "i" to enter the editing state ("insert" will appear in the lower left corner at this time)

2. When exiting, there are 4 situations: save exit, normal exit, exit without saving and force exit

2.1: Save and exit: pressEsc"Insert" will disappear after pressing the key, then pressShift+zzto save the changes and exit

2.2: Exit without saving: When you modify a part of the content and find that the modification is wrong, you will exit without saving

  • according toEsckey, and then enterThen directly enter when entering the commandq!

2.3: Force quit: PressEsckey, and then enterThen directly enter when entering the command!

2.4: Exit normally: pressEsckey, and then enterThen directly enter when entering the commandq

3. In the vim or vi editor, it is often necessary to jump to the last line of the file, or jump to the first line of the file. Here are two ways to achieve the jump

the first way

Then directly enter when entering the command$jump to last line

Then directly enter when entering the command1jump to first line

the second way

shift+g jump to the last line
gg jump to the first line

Rename a file or folder

Rename directory A to B

mv A B

Example: Move the /a directory to /b and rename it to c

mv /a /b/c

In fact, to rename a file or directory in text mode, you only need to use the mv command. For example, to rename a file named abc to 1234:

mv abc 1234

Generate file directory structure

insert image description here

To view only the directory at the current first level:

tree -L 1 

To view only the directories of the current second level:

tree -L 2 

Only view the directories and files of the current Nth level

tree -L N 

Import the above results into the test.txt file:

tree -L 2 >/var/test.txt 
(1)tree  -a 显示所有文件和目录
(2)tree -d 显示目录名称而非内容
(3)tree -f 在每个文件或目录之前,显示完整的相对路径名称
(4)tree -F 在执行文件,目录,Socket,符号连接,管道名称名称,各自加上"*","/","=","@","|"号。
(5)tree -r 以相反次序排列
(6)tree -t 用文件和目录的更改时间排序
(7)tree -L n 只显示 n 层目录 (n 为数字)
(8)tree -dirsfirst 目录显示在前,文件显示在后

View process by PID

Sometimes because the network model is trained on a remote server, in order to avoid the interruption of the server connection and the interruption of the training process, the nohup command will be used:

nohup python train.py … &

However, there will not be any running display or running prompts during the running of the nohup command.
If you want to check the running status of the process, you can check the PID number of the process:
check the occupancy of this port (8282 is the port number):

netstat -anp|grep 8282

View the detailed information of the process with pid 180524:

ps -ef|grep 180524

Guess you like

Origin blog.csdn.net/weixin_44409833/article/details/127240807