Linux for Java Programer

Source: Internet
Author: User
Tags create directory

http//www.kancloud.cn/digest/javaxviii/1267811. finding files Find/-name filename.txt Search by name/the filename.txt file under the directory. Find. -name "*. xml "recursively finds all XML files for find.-name "*.xml" |xargs grep "Hello World" recursively looks up all the file contents of the XML file containing Hello world grep-H ' Spring ' *. XML lookup so there are XML files containing spring find./-size0| Xargs Rm-f &Delete files with zero file size ls-L |grep ' jar ' finds all jar files in the current directory grep ' test ' d*displays all rows that contain test in a file that begins with D. grep ' Test ' AA bb cc shows the line matching test in the aa,bb,cc file. grep ' [A-z]/{5/} ' AA displays all rows that contain a string of at least 5 consecutive lowercase characters per string. 2. See if a program is running PS–EF|grep Tomcat View all processes related to Tomcat3. Terminate thread Kill-919979 thread that terminates thread number bit 199794. viewing files, including hidden files ls-Al5. Current working directory PWD6. copy files cp sourcefolder TARGETFOLDERSCP sourecfile [email protected]:remoteaddr remote Copy7. Create directory mkdir NewFolder8. Delete directory rmdir deleteemptyfolder Delete empty directory rm-RF DeleteFile recursively deletes all contents in the directory9. moving files mv/temp/movefile/TargetFolderTen. Re-command MV Oldnamefile Newnamefile One. Switch User su-username A. modify file Permissions chmod777File.java//File.java permission-rwxrwxrwx,r means read, w indicates write, X is executable -. compress file Tar-CZF Test.tar.gz/test1/test2 -. List compressed file lists tar-Tzf test.tar.gz the. Unzip the file tar-Xvzf test.tar.gz -. View file header 10 lines head-NTenExample.txt -. View end of file 10 lines tail-NTenExample.txt -. View log type files tail-F Exmaple.log//This command automatically displays what's new, and the screen displays only 10 lines of content (can be set).  +. Use Super administrator to execute commands sudo rm a.txt Delete files with administrator status -. View port occupancy netstat-tln |grep 8080 viewing usage of port 8080 +. See which program the port belongs to Lsof-I.:8080 A. View process PS aux|grep java View Java process PS aux view all Processes at. List contents in a tree chart using the tree command under the tree Aps:mac -. File Download wget http://file.tgzinstall wget Command Curl HTTP under Mac://file.tgz -. Network Detection ping www.taobao.com -. telnet to ssh [email protected] -. Print information echo $JAVA _home Print the value of the JAVA home environment variable -. Java Common Commands Java javacjps, Jstat, Jmap, Jstack in. Other commands svn git maven

Linux for Java Programer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.