Linux常用命令

1、ps -ef | grep tomcat  :查询系统启动的进程

2、date :查看或设置当前系统时间

3、ls -lht :列举当前文件夹下所有文件大小

4、自定义系统服务:https://blog.51cto.com/netside/2091513

ps:/ect/profile设置的内容在自启时无效

5、netstat -anlp | grep 8080 :查询端口号

6、find /home/qiao/桌面 -name “1.txt” -exec rm {} ;            ——> 意思即为找到1.txt之后删除它

7、find /user -name text :/user目录下查找名字为text的文件

8、lsof -p pid 查询安装路径(yum install lsof)

原文地址:https://www.cnblogs.com/ws563573095/p/10518061.html