Linux simple commands

Source: Internet
Author: User

Command format

Command "-Options" "Parameters"

Description: The use of individual commands does not follow this format, "" This notation means that you can omit

Mount

Mount-t Cifs-o username=tiandy,password=1111//10.30.20.56/webroot6/root/apache-tomcat-6.0.24/webapps/easy7

lifting the Mount

Umount "-L" (forced release mount)/root/apache-tomcat-6.0.24/webapps/easy7

Plus Permissions

chmod 777 Name (file name)

removing useless things on a virtual machine

RM-RF *_temp is removed from the root directory

View Tomcat Console output

Tail-f/root/apache-tomcat-6.0.24/logs/catalina.out

Remote Debug

Locate the server Tomcat,bin directory under startup.sh file open edit after comment join

Declare-x catalina_opts= "-xdebug-xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001"

Edit

Vim file name open file, enter Edit status

Shift+insert inserting data into the Clipboard

: Wq When you finish editing, save and exit

: Q exit

Clear Cache

cd/root/apache-tomcat-6.0.24/work/catalina/localhost/

RM-RF *

View Historical Command history

History N Lists the most recent n commands

History-c Delete all history in the shell

Top displays information about the processes currently being executed by the system

kill Java Daemon thread

Cd/root/x1

Killall-9 X_daemon

List all version information

Lsb_release-a

copy files to the desktop

SZ Name

upload files to Linux

Rz return

Compression

Unzip Name.zips Decompression

Zip name.zip dirname Compression

Restart Linux

Showdown-r now

or reboot.

How to troubleshoot high CPU problems with Java processes

The first step, the top command, finds the Java process
Step two, jstack-l pid > Xx.log
Step three, Top-h-P PID, find all the Java sub-processes, find the highest CPU sub-process in the list, find the PID, and turn to 16 binary
The fourth step, in Xx.log, searches for the 16 binary characters that can be used to locate which class, method is causing the

Search for Files

Locate apache-tomcat-6.0.24 (file name)

Switch Login User

When the root user logs on, use the su-oracle command to switch to Oracle user login

View process Number

Ps-ef |grep/home/tditslinuxweb/apache-tomcat/bin/

Kill-9 process number (kill process)

Linux simple commands

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.