linux 常用命令
发布时间:2020-12-14 00:16:14 所属栏目:Linux 来源:网络整理
导读:linux 查看公网连接ip curl ifconfig.me 停止进程 ps -ef |grep phpkill -9 4394 设置软连接 ln -sf /usr/local/nginx/sbin/nginx /usr/sbin ln -s /usr/local/python3.5.4/bin/gunicorn /bin/gunicorn 检测是否启动 # 另外该命令也可以让我们知道fpm的配置
linux查看公网连接ipcurl ifconfig.me 停止进程ps -ef |grep php kill -9 4394 设置软连接ln -sf /usr/local/nginx/sbin/nginx /usr/sbin ln -s /usr/local/python3.5.4/bin/gunicorn /bin/gunicorn 检测是否启动# 另外该命令也可以让我们知道fpm的配置文件在哪。 ps aux |grep php-fpm netstat -ant |grep 9000 kill -STOP [pid] 查找并杀死一个程序kill -9 $(ps -ef | grep java | grep -v grep | awk '{print $2}') 开发端口号或直接编辑/etc/sysconfig/iptables -A INPUT -p tcp -m tcp --dport 4000 -j ACCEPT 保存在前面部分 再重启: service iptables restart 开机执行脚本vim /etc/rc.local 查看磁盘空间df -hl 后台运行nohup php yii queue/listen & 终止后台kill pid 查看后台任务ps aux|grep php-fpm linux shell 不能运行vim 下运行 set f linux 查看内存free -m linux 按指定时间运行# 输入以下命令。查看已有的定时任务 crontab -l # 输入 以下命令,进入定时任务文件 crontab -e # * * * * * command #分 时 日 月 周 命令 #第1列表示分钟1~59 每分钟用*或者 */1表示 #第2列表示小时1~23(0表示0点) #第3列表示日期1~31 #第4列表示月份1~12 #第5列标识号星期0~6(0表示星期天) 01 01 * * * /usr/local/php/bin/php /home/www/tongji/protected/yiic.php bank today >/dev/null 2>&1 查看当前http链接数量netstat -pnt | grep :80 | wc -l (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |