Linux-Common commands
Recently, SecureCRT is often used in windows to link Linux to manage java projects. After a long period of time, simple commands cannot be remembered. As a result, I opened the blog Park and began to record my bit/s.
1. Want to know the connected linux version
Cat/proc/version
Cat/etc/issue
Lsb_release-
2. cd, change the Directory
- Cd/: Enter the root directory (cd /)
- Cd...: return to the parent directory (cd ..)
- Pwd: displays the current directory (pwd)
3. ls: list file names
4. touch file name, Create File
5. less file name. You can view the file content by page. It is amazing to support up and down keys.
6. q: exit the opened file and use it with less
7. cat: show all file content
8. tail: displays the content at the end of the file.
9. Create a folder named mkdir
10. rm delete the file, and rmdir Delete the empty directory
11. rz: upload a file and select the file to be transferred.
12. sz file name: download file. Specify the file name. Press enter to download the file to the download directory of your directory.
13. jps, showing java Processes
14. nohup java-jar/home/cargo/ctas/mf-ffm-receiver/ffm-receiver.jar>/dev/null 2> & 1 &, execute the executable jar package and do not output
Since java-jar/home/cargo/ctas/mf-ffm-receiver/ffm-receiver.jar is used, when the connection is closed, the java Process ends and is unavailable
Note: There are three types of redirection in linux:
0: Indicates the standard input.
1: Standard output. in general use, the default value is standard output.
2: Standard error message output
">/Dev/null 2> & 1", redirects the standard output to/dev/null, and redirects the error output to the standard output. In the end, nothing is output.
These are currently used and will be supplemented later