一般重启httpd之前可进行杀死所有http进程:
killall httpd
然后重启httpd:
service httpd restart
如果apache路径在/usr/local/apache2/bin,进入所在目录,重启指令:
sudo apachectl restart
Mysql重启指令,设目录如下则为:
/usr/local/mysql/share/mysql/mysql.server stop
/usr/local/mysql/share/mysql/mysql.server start
查找近2天被修改过的文件:
find -mtime -2 -type f -name *.php
find /usr/local/apache2/htdocs/ -name "*.php" -mtime -10
上面的一句是查看最近十天内的修改PHP文件
网卡重启,不重启服务器:
/etc/init.d/network restart
777权限(drwxrwxrwx):one file's name c,digu mulu used -R
chmod -c 777 filename
注意:chmod -R 777 * 可能是对当前路径所有目录和文件进行改权操作
查看ftp进程状态
service vsftpd status
重启ftp:
service vsftpd restart
service vsftpd start
//
/etc/init.d/vsftpd restart
/etc/init.d/vsftpd start
/etc/init.d/vsftpd stop
rm -rf /var/log/httpd/access
将会删除/var/log/httpd/access目录以及其下所有文件、文件夹
强制删除a.txt文件不提示:
rm -f /usr/local/apache2/a.txt
搜索 小于1024字节的,大于就是+,导出到当前1.txt
find /usr/local/apache2/ -name '*.php' -size -1024 > 1.txt
查看连接数,等待数:
netstat -n |awk '/^tcp/{++S[$NF]}END{for (i in S ) print i,S[i]}'
压缩某文件夹内容到指定目录:
tar -zcvf /usr/local/apache2/yasuohoudewenjian.tar.gz /usr/local/apache2/
解压缩指令:
tar zxvf filezip.tar.gz
封禁某XXX IP访问:
iptables -I INPUT -s xxx.xxx.xxx.xxx -j DROP
根据特征关键字查找文件/木马:
find ./ -name "*.php" |xargs egrep "CiRoaCAgc|phpspy|c99sh|milw0rm|eval\(gunerpress|eval\(base64_decoolcode|spider_bc"
用show processlist 查看当前运行状态。
mysql> show processlist;