Commonly used commands

Source: Internet
Author: User

I usually use some common commands to add to favorites. 1. I use Xshell client to upload local files/download files. It seems like this is common. Www.2cto.com 2. scp fileNanme 10. XX:/home/username: copy the uploaded file to the specified directory. This is used in multi-server copy. 3. less/home/user/xxx. xml is a basic command to quickly view files in the text format. I will mark it here to avoid forgetting it. 4. jar-cvfM0 name. war. /package all files in the current directory into name. war 5, jar-xvf game. decompress war to the current directory 6, bin/startup. sh; tail-f logs/catalina. start Tomcat and display logs 7. ps-ef | grep tomcat query the currently running process named tomcat 9. Use the public key to log on to the remote server to generate a key: ssh-keygen-t rsa copy Public Key: Method 1: scp ~ /. Ssh/id_rsa.pub 10. XX :~ /. Ssh/authorized_keys Method 2: ssh-copy-id-I ~ /. Ssh/id_rsa.pub 10. XX. XX. XX 10. Reverse query DNS Linux: host IP Windows: nsloopup IP 11 based on IP address. decommission package: Package: files or directories packed in tar-jcv-f XXX.tar.bz2: tar-jxv-f XXX.tar.bz2-C decompressed directory package: tar zcvf * .tar.gz XXX unpack: tar zxvf * .tar.gz 12, database backup: mysqldump db_wis>/home/username/db_backup/db_back201211_1028. SQL mysqldump-h10.XX. XX. XX-uusername-ppassword databasename>/home/username/db_backup/db_back201211_1028. SQL 13, MyS QL command: create user 'username' @ 'host' identified by 'Password'; authorized USER: GRANT privileges ON databasename. tablename TO 'username' @ 'host' cancel authorization: REVOKE all ON *. * FROM 'username' @ 'host'; 14, jar package run related: java-cp classes: lib/c3p0-0.9.1.2.jar: lib/log4j-1.2.16.jar: lib/dom4j-1.6.1.jar: lib/mysql-connector-java-5.1.21-bin.jar: lib/fastjson-1.1.22.jar com. XX. XX. service. XXClass 15. find files that contain certain characters. -name *. xml | xa The rgs grep 'ls | xargs grep' keyword 'is suitable for filtering large amounts of data.

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.