下的常用命令 – (centos 系统)
1. linux下删除文件夹的命令
使用rm -rf 目录名字 命令即可
-r 就是向下递归,不管有多少级目录,一并删除
-f 就是直接强行删除,不作任何提示的意思
例如:
删除文件夹实例:rm -rf /var/log/httpd/access
将会删除/var/log/httpd/access目录以及其下所有文件、文件夹
删除文件使用实例:rm -f /var/log/httpd/access.log
将会强制删除/var/log/httpd/access.log这个文件
2. Centos7下安装netstat
yum install net-tools
简单使用: https://www.cnblogs.com/yszd/p/10095214.html
3. 搜索文件
在所有的整个盘里面搜索文件
find / -name 文件
4. centos7安装 apache
https://blog.youkuaiyun.com/quincuntial/article/details/72783761
centos 7 :使用systemctl中的enable、disable 即可。
示例:
#systemctl enable apache.service 开机自启apache服务
#systemctl disable apache.service 关闭开机自启