上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页
摘要: mountdisk(){ if [ ! -e /dev/storage ];then pvcreate $1 vgcreate storage $1 lvcreate -n lv1 -l 100%FREE storage mkfs.ext4 /dev/storage/lv1 mkdir /appda 阅读全文
posted @ 2022-08-06 14:10 shenshu 阅读(100) 评论(0) 推荐(0)
摘要: u 撤销上一步的操作 uu 文本恢复原样 Ctrl+r 恢复上一步被撤销的操作 :%s/aa/bb/g aa全部替换成bb :%s/aa/bb/ 每行的第一个aa全部替换成bb :noh 取消高亮 阅读全文
posted @ 2022-08-06 12:45 shenshu 阅读(41) 评论(0) 推荐(0)
摘要: 1. 命令模式下,输入:/字符串 2. 查看下一个匹配,按下n(小写n) 3. 跳转到上一个匹配,按下N(shift+n) 4. 搜索后,我们打开别的文件,发现也被高亮了,怎么关闭高亮? 命令模式下, 输入:nohlsearch 也可以:set nohlsearch; 当然,可以简写,noh或者se 阅读全文
posted @ 2022-08-05 09:54 shenshu 阅读(633) 评论(0) 推荐(0)
摘要: grep -Ev '^#|^$' aa.conf grep -Ev '^(#|$)' aa.conf 阅读全文
posted @ 2022-08-02 14:03 shenshu 阅读(22) 评论(0) 推荐(0)
摘要: 安装nc yum install nc 服务端开启9999 nc -l 9999 < test.txt 下载文件 nc 127.0.0.1 9999 >test.txt ###验证是否传输完毕 #如果不是连接状态,则已经传输完毕 netstat -netp |grep 9999 阅读全文
posted @ 2022-08-01 21:30 shenshu 阅读(105) 评论(0) 推荐(0)
摘要: .txt 改为.bak , -i 对应 {} [root@lsoiodmuov tmp]# touch {1..10}.txt [root@lsoiodmuov tmp]# ll total 16 -rw-r--r-- 1 root root 0 Jul 31 07:54 10.txt -rw-r- 阅读全文
posted @ 2022-07-31 07:57 shenshu 阅读(66) 评论(0) 推荐(0)
摘要: https://mp.weixin.qq.com/s/-TBM2PUFwsZJFC0egS17IQ 阅读全文
posted @ 2022-07-19 08:58 shenshu 阅读(172) 评论(0) 推荐(0)
摘要: 一、linux根据端口查询进程、服务1、lsof -i:22 (结果包含已连接和监听的状态)2、netstat -nltp|grep 22 假如 pid=25753 3、ps -ef |grep 25753 二、Windows根据端口查询进程netstat -ano|find "LISTENING" 阅读全文
posted @ 2022-07-16 11:48 shenshu 阅读(6707) 评论(0) 推荐(0)
摘要: 压缩文件到指定目录tar -czvf /tmp/11.tar.gz /etc 解压文件到指定目录tar -xzvf 11.tar.gz -C /tmp/123 阅读全文
posted @ 2022-07-12 11:03 shenshu 阅读(67) 评论(0) 推荐(0)
摘要: 一、新建逻辑卷及扩容逻辑卷 https://www.linuxprobe.com/basic-learning-07.html#721 二、扩容逻辑卷(不是新增一块硬盘,是在原来硬盘上扩容) #假设/dev/sdb 为10GB pvcreate /dev/sdb vgcreate storage / 阅读全文
posted @ 2022-07-10 15:53 shenshu 阅读(185) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页