Common linux commands in January 2018 and linux commands in January 2018
Linux commands frequently used in projects
(Note: linux commands must be in lower case !)
(1) ls
Display files in the current directory
(2) vi vim
Enter the editor, you can select the document you want to edit, generally we package the project into a jar package to run, such as: vi message-center.jar, vim display-service.jar
Select the file to be edited and press enter to enter the file: If you want to insert or modify the file, click I to enter the Insert state, click ESC to exit the Insert state, and then: wq to save and exit, remember to have: the colon and lower-case characters are required. Then, in the editor, enter q to exit the editor.
Reference: https://www.cnblogs.com/crazylqy/p/5649860.html
Https://www.cnblogs.com/KiraEXA/p/5994078.html
(3) sh and tail
After the project is packaged as a jar package in IDEA, run the following command on the Terminal:
<1> press enter on the cd target.
<2> java-jar aaaa. jar (enter a and click ESC to automatically complete the jar package name)
Run the jar package first and then view the log, and in linux, run the jar package is more formal is to start with the. sh file (write shell script reference: https://www.cnblogs.com/hanlong/p/5761595.html)
Input: sh bin/message-start.sh run jar package
Enter: tail-fmessage-center.out to view logs
(4) ps-ef | grep java view all java-related processesDetailed reference: https://www.cnblogs.com/sdream/p/5760810.html http://blog.csdn.net/wang_zhenwei/article/details/48729589
(5 ),Kill-9Pid
The kill-9 pid is equal to the kill-s 9 pid, which indicates to force the process to terminate the signal specified by-s as soon as possible.
Pid is the process number to terminate
Reference: http://blog.csdn.net/post_yuan/article/details/53065473