Delete a 0-byte file
Find-type f-size 0-exec rm-rf {} \;
View process
Arrange by memory from large to small
PS-E-o "%c:%p:%z:%a" | Sort-k5-nr
Rank from large to small by CPU utilization
PS-E-o "%c:%p:%z:%a" | Sort-nr
Print out the URL in the cache
Grep-r-a jpg/data/cache/* | Strings | grep "http:" | Awk-f ' http: ' {print ' http: ' $ ';} '
View the number of concurrent requests for HTTP and their TCP connection status
Netstat-n | awk '/^tcp/{++$[$NF]}end{for (A in S) print A,s[a]} '
Sed-i '/root/s/no/yes/'/etc/ssh/sshd_configsed the root line in this article, match the root line and replace No with Yes
How to kill the MySQL process
PS aux | grep MySQL | Grep-v grep | awk ' {print $} ' | Xargs kill-9
Killall-term mysqld
Kill-9 ' Cat/usr/local/apache2/logs/httpd.pid '
Take IP Address
Ifconfig eth0 | grep "InetAddr:" | awk ' {print $} ' | Cut-c 6
Ifconfig | grep ' InetAddr: ' | Grep-v ' 127.0.0.1 ' | Cut-d:-f2 | awk ' {print '} '
Number of network Connections
Netstat-an | Grep-e "^ (TCP)" | Cut-c 68-| Sort | uniq-c | Sort-n
Observation of abnormal processes
Top-id 1
Check the total number of open files
lsof | Wc-l
Kill 80-Port related processes
Lsof-i: 80 | Grep-v "PID" | awk ' {print ' kill-9 ', ' $ ' | Sh
Clear Zombie Process
Ps-eal | awk ' {if ($2== "Z") {print $4}} ' | Kill-9
Number of Statistics URL occurrences
awk ' begin{fs= '/'}{arr[$3]++}end{for (i in arr) print arr[i],i} ' list | Sort-r
Linux Operations Common commands