Common Liunx commands and common liunx commands
1. Tomcat-related commands
Restart tomcat in linux and view tomcat running logs in real time
In Linux, restart Tomcat and run the command!
First, go to the bin directory under Tomcat
Cd/usr/local/tomcat/bin
Use Tomcat to close the command
./Shutdown. sh
Check whether Tomcat is disabled
Ps-ef | grep java
Or ps aux |
Linux executes multiple commands consecutively and linux Multiple commandsIf each command is separated by ";", the next command will be executed no matter whether the command at the front is successfully executed or not.Here, the echo in the second command is intentionally written to one o, and the command execution error does not affect subsequent command execution.In this case, if commands are separated b
the template block.P (uppercase)Print the first line of the template block.QExit sed.R FileRead rows from the file.T labelIf branch, starting from the last line, once the condition is met or the T, T command will lead to branch to the command with a label or to the end of the script.T labelAn error branch starts from the last line. If an error occurs or the T or t command, the Branch is routed to the command with a label or to the end of the script.W FileWrite and append the template block to t
Comparison of common DOS and Linux commands, common linux commands
Comparison of common DOS and Linux commands
Many Linux commands typed at the shell prompt are similar to those you typed in DOS. In fact, some commands are identical.
This appendix provides common
Summary of Common commands for executing scripts in Oracle databases and common commands in oracle
1. Execute an SQL script file
Copy codeThe Code is as follows:Sqlplus user/pass @ servicename
Or
Copy codeThe Code is as follows:SQL> start file_names
Or
Copy codeThe Code is as follows:SQL> @ file_name
We can save multiple SQL statements in a text file, so that when we want to execute all the SQL statements
Built-in commands and external commands under Linux1, the Linux command can be divided into internal commands and external commands:Internal commands are transferred into memory when the system starts, and are resident in memory, so the execution efficiency is high.The external command is the software function of the s
= 255.255.255.0GETEWAY = 192.168.1.1ONBOOT = yesTYPE = EthernetNote: BOOTPROTO can only use the configured IP address in static mode.Modify dnsVim/etc/resolv. confThe modification takes effect immediately and starts as well.
FormAdd nameserver = ***.***.***.***Up to three candidates can be selected as candidates after the previous failure.
Modify host nameEffective immediately:Hostname fc2Start effective:Vim/etc/sysconfig/networkThe format is as follows:NETWORKING = yesHOSTNAME = rh-linux.fc.or
functions:Specific characters used for filtering/searching. Regular expressions can be used in combination with multiple commands.
3. command parameters:-A -- text # Do not ignore binary data.-
-- After-context =
# In addition to displaying the column that conforms to the template style, the content after the row is displayed.
-B -- byte-offset # indicates the number of the first character of the line before the line that conforms to t
position you selected, both soft links and hard links are synchronized.Ln commands are used to link files or directories. for example, if you specify more than two files or directories at the same time, and the final destination is an existing directory, all the previously specified files or directories will be copied to this directory. If multiple files or directories are specified at the same time and the destination is not an existing Directory, a
Ipcclean removes internal and isolated signal sharing signs from the stopped PostgreSQL Server
Pg_ctl start, stop, and restart the postgresql service (for example, pg_ctl start starts the postgresql service, which is the same as service PostgreSQL start)
Pg_controldata displays the internal control information of the postgresql service
Postgres PostgreSQL single-user database service
Postmaster PostgreSQL multi-user database service
4. Psql is the most important client program. To e
If you do not use the built-in command but fork to output a sub-process and execute it in the sub-process, the path of the parent environment will not be changed.
After the execution is completed, it returns to the parent shell environment, and the PWD of the environment is not changed at all, so it will fail.
You can write a script to test CD. Sh.
#! /Bin/bashCD/home/
Run./CD. SH and you will find that the current shell path has not changed.
Similarly, if you want to change many parameters
Common Linux commands and common linux commandsDirectory: relative path and absolute path.
Absolute path: the path is written in the root directory, for example,/usr/share/doc.
Relative Path: the path is not written by/. For example, if/usr/share/doc is to be written under/usr/share/man, you can write it as [cd .. /man: This is the relative path.
Cd: Switch directory; pwd: display the current directory; mkdir: Create a new directory; rmdir: d
Common vi/vim commands and common vivim commandsWorking Mode
INSERT command
A attaches text behind the cursor
A adds text at the end of the line
I insert before the cursor
I insert text at the beginning of the line
O Insert a new row under the cursor
O Insert a new line to the cursorLocating command
H move one character to the left/the arrow to the left
J. Move down one row/down arrow
K move up one row/Up Arrow
L move one character to the right/the
Common CentOS commands and common centos commandsSystem Command yum command
Yum makecache yum generation CacheYum list installed mysql * check whether the * package has been installedRpm-qa | grep mysql * check whether the mysql * package has been installedYum list mysql * check whether there is an installation packageYum search mysql * search package
Restart
Reboot-h now
Shutdown
Shutdown-h now
-H to avoid MySql corruptionView CPU
More/p
Detailed description of iostat commands and vmstat commandsDetailed description of iostat commandsIostat is used to output statistics about input and output of CPU and disk, partition, and Network File System (NFS. The iostat command is used to monitor the input/output status of system devices and generate reports to modify system configurations based on statistical reports for better performance.Command Format:Iostat [-c] [-d] [-N] [-n] [-h] [-k |-m]
Network Communication commands (relatively simple ):
1. write/usr/bin/write
Write [user name]
Used to send information to a user, provided that the user has logged on to the server host
Otherwise, there is no way to leave a message for him. Therefore, write is a real-time communication tool.
End the communication with Ctrl + D
E.g. write guest
2. wall [write all]/usr/bin/wall
Used to broadcast information to all users
Wall [message] [file name]
3. pin
Compression and decompression commands:
. Gz
1. gzip [GNUzip]:/bin/gzip
Gzip option [file] // compressed file,The extension name after compression is .gz.Is the most common and traditional tool in Linux.
// Common software source code package formats
Features: 1) only files can be compressed and directories cannot be compressed.
2) do not retain the original file
E.g. gzipnewfile
2. gunzip [GNUzip]:/bin/gunzip
Or gzip-d
Decompress .gz
. Tar
3. tar:/bi
The difference between the execution and operation of the test command is that the and command changes the destination operand while the test command does not change the destination operand,Only the status of the Flag register is affected, indicating the test result.
The test and CMP commands are familiar. The difference is that the test command usually tests a single bit, while the CMP command tests the entire byte, word, or double word. If the bi
Linux text processing commands
SortCommand
The sort command sorts all rows in the file. The sort command has many very useful options, which were initially used to sort the file content in the database format. In fact, the sort command can be considered as a very powerful data management tool to manage files with similar content to database records.
The sort command sorts the content in the file line by line. If the first character of the two lines is
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.