linux常用命令

Linux开启PHP报错的方法

vi /etc/php.ini
display_errors = Off


rpm -qa | grep mysql    列出所有被安装的rpm package(-q 查询一个包是否被安装)

php -v   查看php及扩展插件版本
find / -name php*   搜索
ps -ef | grep php-cgi   检查进程是否存在
ps aux|grep memcache    查看memcache进程
netstat -an | more      查看端口占用
du -sh blwnew   查看指定目录大小

ps aux|grep 'php-cg[i]'|awk '{print $2}'|xargs kill -9 

列出同一组php-cgi进程打印输出并全部杀死

mv A/book/* B/book/  移动目录有重复直接覆盖

mv -f 源路径 目标路径 移动文件直接覆盖

top -d 0.1  以1毫秒速度刷新性能监控

find . -mtime +2 -type f -name "sess_*" -exec rm -f {} \;   批量删除当前目录2天前文件名包含"sess_"

find . -perm 755 -exec rm -f {} \;   批量删除权限755的

find . -ctime 0 -print   查找当天文件

你可能感兴趣的:(linux常用命令)