Git Common commands and git Common commands===== Git Common commands ======= 1.Git documentation ===Git Chinese Document viewing address: http://git.oschina.net/progit/=== 2.Git basic commands ===Git config -- global user. name // set the global user name without adding gloabl as a localGit config -- global user. email
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 |
= 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
Linux system management commands
WallCommand
The function of this command is to send information to all logged-on users. You can first write the information to be sent to a file, and then enter:
# Wall
In this way, information can be sent to all users.
In the preceding example, the symbol "
# Wall' thank you! '
Broadcast message from root (tty1) Fri Nov 26 14:15:07 1999...
Thank you!
#
After executing the preceding command, the user's screen display
In the process of using Linux, we need to follow some parameters after each command. However, it is troublesome to manually add common parameters each time. Linux may use the command alias function to reduce your input. The following operations will be clear.
OS: RedHat as4.2
Ls-l list detailed document directory informationLs-Hl lists document sizes, in K.Ls-hlt lists documents sorted by Time
For the above three displays, we only need to configure alias LL = 'LS-LHT 'so that we can enter ll.
3. File backup and compression commands:(1) bzip2 command: Used to compress files. bzip2 file name, suffix bz2. Unzip to: BUNZIP2 file name. bz2(2) Gzip command: Use gzip to compress files. gzip file name, and the suffix is gz. Unzip to: Gunzip file name. gz(3) Tar command: Package A large number of files and directories into a single file. TAR-CVF Filename.tar Directory/file Filaname.tar represents the file to be created, and the directory/file repre
1. Commands for managing files and directories:(1) Pwd:print working directory (print working directory), when entering PWD, requires the Linux system to display the current location.(2) CD command: The CD command is used to change the directory in which it is located. Always return to the current home directory. If you need to convert to a different directory, you need a path name. [The difference between an absolute path and a relative path: if the
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.