随笔分类 -  LINUX

摘要:指定行替换字符串: sed '1,$ s/you/she/g' a.txt :(对源文件添加的话就用-i参数)-i参数是对源文件进行修改; 1 i 在第一行前面添加; 2 i 在第二行前面添加; $a 在最后一行后面添加; [root@zhangchao ~]# cat ws.txt I am Zh 阅读全文
posted @ 2022-11-23 18:11 i舒 阅读(589) 评论(0) 推荐(0) 编辑
摘要:只转化某个单词 guw 、gue gUw、gUe 这样,光标后面的单词便会进行大小写转换 想转换5个单词的命令如下: gu5w、gu5e gU5w、gU5e 转换几行的大小写 4、转换几行的大小写 将光标定位到想转换的行上,键入:1gU 从光标所在行 往下一行都进行小写到大写的转换 10gU,则进行 阅读全文
posted @ 2022-10-15 08:24 i舒 阅读(234) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/qq_41619571/article/details/124702843 阅读全文
posted @ 2022-09-28 21:49 i舒 阅读(11) 评论(0) 推荐(0) 编辑
摘要:yum remove git rpm -ivh http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-1.noarch.rpmyum -y install git https://blog.csdn.net 阅读全文
posted @ 2022-08-30 16:00 i舒 阅读(19) 评论(0) 推荐(0) 编辑
摘要:Docker 清理none镜像 Prune命令 - 岁月静好· - 博客园 (cnblogs.com) 阅读全文
posted @ 2022-07-24 21:27 i舒 阅读(30) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/xiajun07061225/article/details/7039413 linux 下vim的使用(必看)_ID_King的博客-CSDN博客_linux vim 阅读全文
posted @ 2022-07-22 08:29 i舒 阅读(23) 评论(0) 推荐(0) 编辑
摘要:curl -1sLf 'https://dl.cloudsmith.io/public/asbru-cm/release/cfg/setup/bash.deb.sh' | sudo -E bashsudo apt install asbru-cm https://www.asbru-cm.net/ 阅读全文
posted @ 2022-06-21 20:23 i舒 阅读(152) 评论(0) 推荐(0) 编辑
摘要:https://wenku.baidu.com/view/d1fdf0f05df7ba0d4a7302768e9951e79b8969dc.html https://blog.csdn.net/qq_38191833/article/details/101853236?utm_term=%E5%A6 阅读全文
posted @ 2022-06-19 22:34 i舒 阅读(175) 评论(0) 推荐(0) 编辑
摘要:问题背景:hook 系统调用 在加载模块时error. 原因应该是内核4.X版本太高,内核代码有更改。降级系统后发现没有3.16 -generic 目录遇到这个错误,主要是没安装内核安装包(类似于kernel-devel的名字)但是这种情况下一般有两种情况:有安装内核开发包,但是因为各种各样的原因没 阅读全文
posted @ 2022-01-14 22:51 i舒 阅读(1266) 评论(0) 推荐(0) 编辑
摘要:sg = "ls"def sout new StringBuilder(), serr new StringBuilder()def proc = ["/bin/bash", "-c", sg].execute()proc.consumeProcessOutput(sout, serr)proc.w 阅读全文
posted @ 2021-06-23 09:29 i舒 阅读(385) 评论(0) 推荐(0) 编辑
摘要:expect send send_user #打印输出 puts打印字符到屏幕 sleep 休眠 xx s wait 等待进程执行结束 expect eof 退出expect进程 set timeout #设置等待超时时长 expect最常用的语法(tcl语言:模式-动作) 单一分支模式语法: ex 阅读全文
posted @ 2021-06-23 08:33 i舒 阅读(609) 评论(0) 推荐(0) 编辑
摘要:我们做脚本编程的时候开头总会遇到以下语句,这些语句就是指定解释器,指定什么解释器就用该解释器运行: #!/usr/bin/bash #!/usr/bin/python #!/usr/bin/expect #!/usr/bin/env python 执行的时候就有两种方式 一种是解释器+脚本 另一种是 阅读全文
posted @ 2021-06-22 08:06 i舒 阅读(140) 评论(0) 推荐(0) 编辑
摘要:df -h pvdisplay vgdisplay fdisk -l #查看并找出新加磁盘 wipefs -a /dev/sdb #如已有分区表需先擦除,否则可跳过 #在新磁盘创建物理卷: pvcreate /dev/sdb #将新磁盘添加到目标物理卷组 vgextend rootvg /dev/s 阅读全文
posted @ 2021-06-17 19:20 i舒 阅读(84) 评论(0) 推荐(0) 编辑
摘要:安装了openssh-server之后,默认情况下是不允许root用户通过ssh远程登录的,只允许一般用户通过ssh登录系统。要开启root用户远程登录的权限, 需要通过文本编辑器修改配置文件/etc/ssh/sshd_config文件,将PermitRootLogin的选项值设置为yes即可 ht 阅读全文
posted @ 2021-06-16 13:07 i舒 阅读(189) 评论(0) 推荐(0) 编辑
摘要:Elementary knowledge of linux shell, python and robot Linux: https://www.linuxprobe.com/basic-learning-02.html Python: https://pythonbasics.org/ Robot 阅读全文
posted @ 2021-05-21 10:16 i舒 阅读(36) 评论(0) 推荐(0) 编辑
摘要:https://stackoverflow.com/questions/52069573/read-only-file-system-on-vagrant-visualbox-ubuntu16-04 磁盘坏道检查: https://www.jianshu.com/p/6020d4fbcde2 阅读全文
posted @ 2021-04-28 14:12 i舒 阅读(54) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/Chorder/p/9114513.html https://xz.aliyun.com/t/7245 https://cloud.tencent.com/developer/article/1542391 https://segmentfault.c 阅读全文
posted @ 2021-04-27 18:15 i舒 阅读(194) 评论(0) 推荐(0) 编辑
摘要:使用w, who, who am i, 等命令查出对应终端, 然后使用如下命令发送 首先,我们需要了解一个重要的东西,就是终端在linux中是怎么操作怎么表示的。 tty指的就是终端设备,我们可以把它当成我们本地登录的这些终端。 pts指的是虚拟终端,当我们网络登录的时候,总是能看到它。 tty指令 阅读全文
posted @ 2021-03-30 17:37 i舒 阅读(477) 评论(0) 推荐(0) 编辑
摘要:Linux中可通过Remote X实现远程桌面控制 一、Remote X假设本地主机ip为172.16.1.1,远程的主机ip为172.16.1.2第一步,在本地主机上的任意一个xterm中执行xhost,用来允许远程的其它主机可以和本地主机的X server联网:xhost+ 172.16.1.2 阅读全文
posted @ 2021-03-30 15:37 i舒 阅读(1441) 评论(0) 推荐(0) 编辑