Linux Centos命令记录

删除安装的软件

1
2
3
4
5
6
7
8
9
10
11
# rpm卸载
# rpm -e 软件名
rpm -e jenkins

# 检查是否卸载成功
# rpm -ql 软件名
rpm -ql jenkins

# 彻底删除残留文件
# find / -iname 软件名 | xargs -n 1000 rm -rf
find / -iname jenkins | xargs -n 1000 rm -rf

查看软件的可安装版本

1
2
# dnf --showduplicates search 软件名
dnf --showduplicates search jenkins

根据文件名查找文件位置

1
2
# find 路径 -name "文件名"
find / -name nps

查看端口占用情况

1
2
# netstat -tunlp | grep 端口号
netstat -anp | grep 8000