随笔分类 -  linux

摘要:cat /etc/sudoers OAuser ALL=(ALL:ALL) /bin/cat, /bin/ls, /usr/bin/vim 别忘了添加账号并修改密码 useradd OAuser passwd OAuser 阅读全文
posted @ 2024-04-24 20:35 不会跳舞的胖子 阅读(9) 评论(0) 推荐(0) 编辑
摘要:批量插入 for i in *;do sed "30i \ last_update_data_time,\n latest_fans,\n latest_content_count,\n latest_attention," $i;done 阅读全文
posted @ 2024-04-12 14:45 不会跳舞的胖子 阅读(5) 评论(0) 推荐(0) 编辑
摘要:下载Openssh和Openssl wget ftp://mirrors.sonic.net/pub/OpenBSD/OpenSSH/portable/ wget https://www.openssl.org/source/openssl-1.1.1h.tar.gz 安装Openssl tar - 阅读全文
posted @ 2024-02-20 19:43 不会跳舞的胖子 阅读(140) 评论(0) 推荐(0) 编辑
摘要:查看进程运行时间 ps -eo pid,etime,cmd |grep 180600 180600 329-19:33:44 java -jar wxproject-1-SNAPSHOT.jar -e:显示所有进程,包括没有终端的进程。 -o pid,etime,cmd:指定输出的格式,其中 pid 阅读全文
posted @ 2023-09-26 10:42 不会跳舞的胖子 阅读(15) 评论(0) 推荐(0) 编辑
摘要:rsync -avz -e 'ssh -p 9999' --remove-source-files --include='*.zip' /data/ root@x.x:/data/ --remove-source-files 同步完成后,删除原文件 阅读全文
posted @ 2023-07-31 11:41 不会跳舞的胖子 阅读(49) 评论(0) 推荐(0) 编辑
摘要:查询已连接 [root@rabbitmq-1 rabbitmq]# netstat -an | awk '{print $5}' | cut -d: -f1 |sort |uniq -c |sort -rn 3393 172.16.229.253 2995 172.16.47.212 400 172 阅读全文
posted @ 2023-07-27 11:52 不会跳舞的胖子 阅读(250) 评论(0) 推荐(0) 编辑
摘要:升级内核:https://www.cnblogs.com/rtnb/p/16665005.html modprobe br_netfilter sysctl -p 阅读全文
posted @ 2023-01-19 09:58 不会跳舞的胖子 阅读(154) 评论(0) 推荐(0) 编辑
摘要:第一种 [root@localhost bin]# who root tty1 2022-12-15 21:24 root pts/0 2022-12-15 15:04 (192.168.20.65) [root@localhost bin]# pkill -kill -t tty1 第二种[roo 阅读全文
posted @ 2022-12-15 21:28 不会跳舞的胖子 阅读(145) 评论(0) 推荐(0) 编辑
摘要:早上收到预警,mysql 发生了自动重启,查看mysql.log并没有发现异常,于是查看了一下/var/log/syslog,发现了以下日志 将自动更新服务停止 sudo apt-get remove unattended-upgrades sudo systemctl stop apt-daily 阅读全文
posted @ 2022-10-26 09:52 不会跳舞的胖子 阅读(1098) 评论(0) 推荐(0) 编辑
摘要:find . -type f -name *.log -mtime + -exec rm {} \; 阅读全文
posted @ 2022-09-30 10:56 不会跳舞的胖子 阅读(376) 评论(0) 推荐(0) 编辑
摘要:检查当前 ~# echo $LANG en_US.UTF-8 安装中文包 yum search Chinese vim /etc/locale.conf LANG=zh_CN.UTF-8 source /etc/locale.conf 阅读全文
posted @ 2022-09-26 09:23 不会跳舞的胖子 阅读(31) 评论(0) 推荐(0) 编辑
摘要:28 uname -a 29 cat /etc/redhat-release 30 rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org 31 rpm -Uvh http://www.elrepo.org/elrepo-release- 阅读全文
posted @ 2022-09-07 12:45 不会跳舞的胖子 阅读(46) 评论(0) 推荐(0) 编辑
摘要:python -W ignore file.py 阅读全文
posted @ 2022-09-06 13:54 不会跳舞的胖子 阅读(46) 评论(0) 推荐(0) 编辑
摘要:参考文档:https://cloud.tencent.com/developer/article/2015386 $ ps -p 8299 -o etime ELAPSED 04:05:37 etimes 关键字查看经过的时间(以秒为单位) $ ps -p 8299 -o etimes ELAPSE 阅读全文
posted @ 2022-08-29 09:06 不会跳舞的胖子 阅读(266) 评论(0) 推荐(0) 编辑
摘要:mv 1.txt 1.txt-`date '+%Y-%m-%d'` cp 1.txt 1.txt-`date '+%Y-%m-%d-%H-%M-%S'` 昨天 date -d last-day +%Y%m%d 自定义 date +%Y-%m-%d --date '2 days ago' 阅读全文
posted @ 2022-08-23 21:02 不会跳舞的胖子 阅读(279) 评论(0) 推荐(0) 编辑
摘要:[root@linux-host1 ~]# cd /etc/sysconfig/network-scripts/ [root@linux-host1 network-scripts]# vim ifcfg-bond0 BOOTPROTO=static NAME=bond0 DEVICE=bond0 阅读全文
posted @ 2022-07-23 13:11 不会跳舞的胖子 阅读(363) 评论(0) 推荐(0) 编辑

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