随笔分类 -  linux

摘要:ionice -c 3 rm /var/logs/syslog #rm空闲io级别,在其他进程不使用的时候在使用io(0 表示无、1 表示实时、2 表示尽力、3 表示空闲) ionice -p PID #查看进程当前io级别和优先级 ionice -c 2 -n 6 rm /var/logs/sys 阅读全文
posted @ 2020-09-21 00:20 菜鸟web 阅读(503) 评论(0) 推荐(0) 编辑
摘要:-atime #最近时间(天) -mtime #修改时间(天) -ctime #变化时间(天)-amin #最近时间(分)-mmin #修改时间(分)-cmin #变化时间(分)-size #文件大小-perm #文件权限-user #用户文件 find . -type f -atime -7 -p 阅读全文
posted @ 2020-09-01 00:18 菜鸟web 阅读(188) 评论(0) 推荐(0) 编辑
摘要:录制 script -t 2> timing.log -a output.session #开始录制,输入exit退出录制 scriptreplay timing.log output.session #回放录制的命令 xargs xargs -n 3 #每行3个字符分行 xargs -d ; #以 阅读全文
posted @ 2020-08-30 22:40 菜鸟web 阅读(158) 评论(0) 推荐(0) 编辑
摘要:ssh后门 可以通过创建软链接来远程,排查是否有用软链接远程和解决方法 ss -lntup #查看是否有可疑的端口,修改远程端口后的22端口也会被利用 ss -lntup|grep 12345 #查看可疑端口进程id,看看软连接文件在哪里 ps -ef|grep pid #查看软连接文件位置 kil 阅读全文
posted @ 2020-08-23 17:00 菜鸟web 阅读(215) 评论(0) 推荐(0) 编辑
摘要:date +%Y%m%d //显示前bai天年月日 date +%Y%m%d --date="+1 day" //显示前一天的du日期 date +%Y%m%d --date="-1 day" //显示后一天的日期 date +%s //从 1970 年 1 月 1 日 00:00:00 UTC 到 阅读全文
posted @ 2020-08-15 15:54 菜鸟web 阅读(137) 评论(0) 推荐(0) 编辑
摘要:文件 运算符 对比符 阅读全文
posted @ 2020-08-11 21:35 菜鸟web 阅读(228) 评论(0) 推荐(0) 编辑
摘要:#根据源地址决定路由表 ip rule add from 192.168.10.0/24 table 100 ip rule add from 192.168.20.20 table 110 #根据目的地址决定路由表 ip rule add to 192.168.30.0/24 table 120 阅读全文
posted @ 2020-07-18 21:39 菜鸟web 阅读(770) 评论(0) 推荐(0) 编辑
摘要:当服务器对接的交换机端口是trunk多vlan模式,需要在服务器网卡上要配置vlan-id,Linux和VMware等等系统都是可以配置vlan-id Juniper等交换机如何vlan打了标签,要去除标签才行 阅读全文
posted @ 2020-07-17 17:46 菜鸟web 阅读(327) 评论(0) 推荐(0) 编辑
摘要:1、打印文件的第一列(域) : awk '{print $1}' filename2、打印文件的前两列(域) : awk '{print $1,$2}' filename3、打印完第一列,然后打印第二列 : awk '{print $1 $2}' filename4、打印文本文件的总行数 : awk 阅读全文
posted @ 2020-06-28 00:31 菜鸟web 阅读(362) 评论(0) 推荐(0) 编辑
摘要:客户端安装 centos:yum install git windows:官网下载 客户端配置 git config --global user.name 'wangwei ##用户名称,方便提交数据到服务器的时候,知道数据是谁提交的 git config --global user.email ' 阅读全文
posted @ 2020-06-22 01:45 菜鸟web 阅读(254) 评论(0) 推荐(0) 编辑
摘要:-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory 解决方法: centos6:etc/sysconfig/i18n centos7:/etc/local 阅读全文
posted @ 2020-06-14 20:19 菜鸟web 阅读(349) 评论(0) 推荐(0) 编辑
摘要:hash:ip #存储IP hash:ip,port #存储IP加端口 hash:net #存储IP段和IP bitmap:port #存储端口 ipset create address hash:ip #创建集合名为address,存储ip ipset create address-port ha 阅读全文
posted @ 2020-06-14 01:54 菜鸟web 阅读(986) 评论(0) 推荐(0) 编辑
摘要:snapshotting /etc/redis.conf save 900 1 # 900秒内超过1个键被修改,则启动快照保存 save 30 10 # 30秒内超过10个键被修改。则启动快照保存dir /data/redis #指定保存路径 手动保存 set name key set name k 阅读全文
posted @ 2020-06-10 00:29 菜鸟web 阅读(202) 评论(0) 推荐(0) 编辑
摘要:ssh开启 ee /etc/inetd.conf #去掉sshd注释 ee /etc/ssh/sshd_config PermitRootLogin no改为PermitRootLogin yes PasswordAuthentication no改为PasswordAuthentication y 阅读全文
posted @ 2020-06-08 22:23 菜鸟web 阅读(304) 评论(0) 推荐(0) 编辑
摘要:安装 yum install epel-release yum install -y redis yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm #安装最新的版本 yum --enablerepo= 阅读全文
posted @ 2020-06-06 22:45 菜鸟web 阅读(232) 评论(0) 推荐(0) 编辑
摘要:安装 yum install libevent libevent-devel yum install memcached 配置 systemctl start memcached #启动 /etc/sysconfig/memcached #配置信息 memcached-tool 127.0.0.1: 阅读全文
posted @ 2020-06-05 01:50 菜鸟web 阅读(325) 评论(0) 推荐(0) 编辑
摘要:- hosts: home #对应/etc/ansible/hosts的组或者ip remote_user: root #执行用户 tasks: #任务 - name: install httpd #任务名 yum: name=httpd state=present - name: install 阅读全文
posted @ 2020-05-29 22:55 菜鸟web 阅读(261) 评论(0) 推荐(0) 编辑
摘要:因为ubuntu18已经没有用rc.local,因为日常用的习惯所以我们下面进行创建 1.创建rc.local软链接(因为system只会读取/etc/systemd/system下的文件) ln -fs /lib/systemd/system/rc-local.service /etc/syste 阅读全文
posted @ 2020-05-29 12:47 菜鸟web 阅读(1925) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示