栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

常用命令集合

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

常用命令集合

ps -aux | grep redis
查看服务端口,后可直接接端口号
删除所有没有tracked过的文件
git clean -d -fx
redis-cli -h HOST -p 6379 --scan --pattern "site_point*" | xargs -L 2000 redis-cli -h HOST -p 6379 del
命令行批量删除带有前坠的key
redis-cli --raw keys "phone_detail*" | xargs redis-cli del
项目目录输入,系统会自动保存最近输入成功的密码
git config --global credential.helper store
更改session存储路径
session.save_path = "/www/php_session"
git checkout . #本地所有修改的。没有的提交的,都返回到原来的状态
忽略版本匹配
composer install --ignore-platform-reqs
禁止 包含qq.com的域名访问
iptables -I OUTPUT -p tcp -m string --string "bt.cn" --algo bm -j DROP
iptables -I OUTPUT -p udp -m string --string "bt.cn" --algo kmp -j DROP
这里是引用
iptables如果无法直接保存,需要安装iptables-services:
yum install iptables-services
设置开机启动
systemctl enable iptables 
常用命令
 
systemctl stop iptables
systemctl start iptables
systemctl restart iptables
systemctl reload iptables
保存
service iptables save
firewalld防火墙
启动服务:
systemctl start firewalld
这里不用担心启用了防火墙以后无法通过ssh远程,22端口默认加入了允许规则

停止服务:
systemctl stop firewalld
重启服务:
systemctl restart firewalld
查看服务状态:
systemctl status firewalld
git强制覆盖
git fetch --all
git reset --hard origin/master
git pull

一条执行
git fetch --all &&  git reset --hard origin/master && git pull
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/361136.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号