当前位置:网站首页>Shell script kills the process according to the port number
Shell script kills the process according to the port number
2022-07-03 08:53:00 【Xiaoping is extraordinary】
port=8030
# According to the port number to query the corresponding PID
pid = $(netstat -nlp | grep :$port | awk '{print $7}' | awk -F"/" '{print $1}');
# Kill the corresponding process If PID non-existent , That is, the port is not turned on , Do not perform
if [ -n "$pid" ]; then
kill -9 $pid;
fi
边栏推荐
- cres
- php public private protected
- [concurrent programming] synchronization container, concurrent container, blocking queue, double ended queue and work secret
- 【Rust 笔记】13-迭代器(上)
- [RPC] RPC remote procedure call
- Concurrent programming (III) detailed explanation of synchronized keyword
- [rust notes] 05 error handling
- 【Rust笔记】02-所有权
- Allocation exception Servlet
- [rust note] 10 operator overloading
猜你喜欢

第一个Servlet

Unity editor expansion - draw lines

Es8 async and await learning notes

Monotonic stack -42 Connect rainwater

JS non Boolean operation - learning notes

Unity editor expansion - controls, layouts

Drawing maze EasyX library with recursive backtracking method

Log4j2 vulnerability recurrence and analysis

注解简化配置与启动时加载

Markdown learning
随机推荐
First Servlet
[concurrent programming] concurrent security
Markdown learning
file_ put_ contents
Binary tree traversal (first order traversal. Output results according to first order, middle order, and last order)
Animation_ IK overview
[rust notes] 07 structure
cres
Campus lost and found platform based on SSM, source code, database script, project import and operation video tutorial, Thesis Writing Tutorial
树形DP AcWing 285. 没有上司的舞会
[rust notes] 05 error handling
Unity editor expansion - window, sub window, menu, right-click menu (context menu)
20220630 learning clock in
Convert video to GIF
【Rust 笔记】12-闭包
Concurrent programming (VI) ABA problems and solutions under CAS
Binary tree sorting (C language, int type)
Memory search acwing 901 skiing
Deeply understand the underlying data structure of MySQL index
单调栈-503. 下一个更大元素 II