SCP command
-P port parameter immediately port parameters, no spaces, the latter two for the file path, the copy direction from front to back, does not distinguish between local and remote paths
Distal path format: user name @ address: Remote Path
chestnut:
scp -P22000 ./clearLog.sh [email protected]:/root/taskBash
SELinux
ps -l displays the foreground program is being executed
Tips: When executing the command, the command & tail added later stage will be the implementation of the form
Background commands, handover management
- ctrl + z foreground operation instruction can be used in the current ctrl + z pause instruction to the background
- fg n ctrl + z will be placed back-to-back wakeup foreground continue, number n appear is suspended
- bg n will suspend instruction form continues to run after the table, n is the number of pause time
Offline run the program nohup
The use of nohup command nohup does not support the bash built-in command , so please use shellScript script execution, chestnuts
# & 后台运行
nohup ./test.bash &
After the execution, it will output the prompt, press Return to return to the front desk, check-out operation will not interrupt instruction is executed
Process Management
- top: process information dynamically view, similar to win the following task manager into the memory shift + e can switch display units
- ps: the process list displays information
- pstree: View the current process tree
[root@www ~]# ps aux <==观察系统所有癿程序数据
[root@www ~]# ps -lA <==也是能够观察所有系统癿数据
[root@www ~]# ps axjf <==连同部分程序树状忞
ps parameters:
- A: All Qie process are displayed, no -e have the same Qiedian use;
- a: For Qie Ji not all Process terminal;
- u: active users (effective user) associated Qie Process;
- x: a generally used with this parameter, more complete information can be listed.
Output format YingYing plan: - l: longer, more detailed Shen Qie the listed information PID Qieqie;
- j: Work Qie format (jobs format)
- f: to make a more complete output
Use top: -dn refresh interval in real time, in seconds, key definition after the start of the following instruction, instruction parameters not
- P: displays are needed as a CPU resource ordering;
- M: Memory are needed as to display resource ordering;
- shift + e reality switch storage unit
- 1: All concrete core CPU occupancy
- q: quit
pstree parameters:
- A: each of the program tree Fu Qie connection between the connection to ASCII characters;
- U: each program between tree Fu Qie Qie connection to Unicode characters to connect. In some terminal interfaces may be
wrong; - p: Jian Qie also lists the PID of each process;
- u: Jian also listed for each process Qie your account name.
The process of killing
kill -signal PID
kill -9 pid/(%jobNumber)如果要管理jobs中的线程,需加上%
kill -l # 显示各类终止信号signal值与名称
kill command can be passed to different processes messages, perform different actions, commonly used are:
- 1: Re Qie Connaught take a parameter configuration file (reload the like);
- 2: representative of the keyboard input help [ctrl] -c same as Mai Qie;
- 9: immediately force the removal of a work;
- 15: Qie normal procedures terminate one are working. -9 Ji Qie not the same.
- 17: Pause, with ctrl + z
Instruction CPU priority
n: root values: -20-19, the general user 0-19, the lower the value, the higher the priority
nice [-n 数字] command
RAM
free -k / m / g kb / mb / gb memory information is displayed
Linux System Services
Related Category
table of Contents |
---|
/etc/init.d/* |
/etc/sysconfig/* |
/etc/* |
/ Var / lib / * |
/ Var / run / * |
/etc/init.d/syslog/* |
service instructions
service [service name] (start|stop|restart|...)
View status:
service --status-all
Tips: Centos has been replaced in 7+ be basically the same as systemctl manage usage