linux 常用命令

查看进程号 
ps -ef|grep nginx 
ps -ef | grep php-fpm            
ps -ef | grep php

杀死进程 
kill -QUIT 2072

nginx配置是否正确   
./nginx -t

php-fpm 目录 /app/php7.2/etc/php-fpm.conf
查看是否安装定时任务 which crontab
开启定时任务 service crond start

crontab –e : 修改 crontab 文件. 如果文件不存在会自动创建。 
crontab –l : 显示 crontab 文件。 
crontab -r : 删除 crontab 文件。
crontab -ir : 删除 crontab 文件前提醒用户。

ssh -p 80 bug@192.168.0.1 ssh远程连接

进入nginx启动程序目录 cd /app/nginx/sbin
查看进程 ps -ef|grep nginx
杀掉进程 kill -QUIT 2072     
查看nginx 配置  ./nginx -t
加载配置文件并启动nginx  ./nginx -c /app/nginx/conf/nginx.conf

删除当前目录下所有文件/文件夹 rm -rf *

删除文件夹实例:rm -rf /var/log/httpd/access
将会删除/var/log/httpd/access目录以及其下所有文件、文件夹

拷贝文件 cp -r /app/htdocs/project/Application /app/htdocs/project/Application

打包文件 tar cvf FileName.tar DirName

 

posted @ 2019-04-25 13:52  加菲猫and大白  阅读(154)  评论(0编辑  收藏  举报