In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you the "Java development will be what Linux commands", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Java development will be what Linux commands there are" this article.
1. Find a file
Find /-name filename.txt looks for the filename.txt file in the / directory by name.
Find. -name "* .xml" recursively finds all xml files
Find. -name "* .xml" | xargs grep "hello world" recursively finds all xml files containing hello world in their contents
Grep-H 'spring' *. Xml to find some xml files that contain spring
Find. /-size 0 | xargs rm-f & Deletes files with zero file size
Ls-l | grep '.jar' to find all jar files in the current directory
Grep 'test' d * displays lines that contain test in all files that begin with d.
Grep 'test' aa bb cc displays lines that match test in the aa,bb,cc file.
Grep'[a Murz]\ {5\}'aa displays all lines that contain at least five consecutive lowercase characters for each string.
two。 Check whether a program is running
Ps-ef | grep tomcat to view all processes related to tomcat
Ps-ef | grep-- color java highlights the keyword to be queried
3. Terminating thread
Kill-9 19979 terminates a process with thread number 19979
4. View files, including hidden files
Ls-al
5. Current working directory
Pwd
6. Copy a file
Cp source dest copy Fil
Cp-r sourceFolder targetFolder recursively copies the entire folder
Scp sourecFile romoteUserName@remoteIp:remoteAddr remote copy
7. Create a directory
Mkdir newfolder
8. Delete directory
Rmdir deleteEmptyFolder delete empty directory rm-rf deleteFile recursively delete everything in the directory
9. Move Fil
Mv / temp/movefile / targetFolder
10. Repeat the order
Mv oldNameFile newNameFile
11. Switch users
Su-username
twelve。 Modify file permissions
Permissions for chmod 777 file.java / / file.java-rwxrwxrwx,r for read, w for write, x for executable
13. Compressed file
Tar-czf test.tar.gz / test1 / test2
14. List the compressed files
Tar-tzf test.tar.gz
15. Extract the file
Tar-xvzf test.tar.gz
16. View the first 10 lines of the file
Head-n 10 example.txt
17. View the last 10 lines of the file
Tail-n 10 example.txt
18. View log type files
Tail-f exmaple.log / / this command automatically displays the new content, and the screen displays only 10 lines of content (configurable).
19. Execute commands using the Super Admin identity
Sudo rm a.txt uses the administrator identity to delete files
20. View port occupancy
Netstat-tln | grep 8080 to view the usage of port 8080
21. Check which program the port belongs to
Lsof-I: 8080
twenty-two。 View the process
Ps aux | grep java to view java processes
Ps aux to view all processes
23. List the contents of the directory in a tree view
Tree a
Use the tree command under ps:Mac
24. File download
Install wget commands under wget http://file.tgz mac
Curl http://file.tgz
25. Network detection
Ping www.just-ping.com
twenty-six。 Remote login
Ssh userName@ip
twenty-seven。 Print information
Echo $JAVA_HOME prints the value of the java home environment variable
28.java common commands
Java javac jps, jstat, jmap, jstack
twenty-nine。 Other commands
Svn git maven
28.linux Command Learning website:
Http://explainshell.com/
The above is all the contents of the article "what are the Linux commands that must be used in Java development?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.