Linux screen命令的使用

1.执行:screen -S xxx 创建screen会话2.执行:screen -ls 查看对应会话的session id3.执行:screen -D -r session id注意:session id 为一串数字脚本下的screen命令1.首先,脚本新建screen窗口screen_name=$"你的screen名字" screen -dmS $screen_nam

- 阅读全文 -

Shell 中sed 的操作

删除file.txt的1~3行sed -i '1,3d' file.txt-i 选项用于直接修改原文件。删除file.txt第4行及之后的所有行sed -i '4,$d' file.txt4.在file.txt文件最后追加 hello wordsed -i '$a hello word' file.txt

- 阅读全文 -

Linux 下使用vim 一些操作

1.首先系统里面要安装vim2.查找vimrc简本配置3.编辑找到的这个vimrc在配置最后加上如下几行: set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 set termencoding=utf-8 set encoding=utf-8 4.vim中全文替换:%s#abc#def#g(用def替换文件中所有的abc) 5.vi

- 阅读全文 -

Linux 卸载阿里云盾监控及屏蔽云盾检测

卸载阿里云云盾命令:wget http://update.aegis.aliyun.com/download/uninstall.sh chmod +x uninstall.sh ./uninstall.sh wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh chmod +x quartz_uninstall.sh

- 阅读全文 -

Linux Centos更新内核版本&&删除多余的内核

方法一:更新至最新主线版本1.启用 ELRepo 仓库# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm 2.列出可用的内核相关包yum --disablerepo="

- 阅读全文 -

Docker 使用整合

1.更新源和依赖包yum install -y epel-release yum update yum install -y yum-utils device-mapper-persistent-data lvm2 2.安装docker86_64curl -sSL https://get.docker.com/ | sh arm◎.修改源 nano /etc/apt/sources.list d

- 阅读全文 -

Linux 一些有趣的命令

1.黑客帝国代码echo -e "\e[32m"; while :; do printf '%*c' $(($RANDOM % 30)) $(($RANDOM % 2)); done 2.Linux 登录motd界面1).vi /etc/motd 2).复制下面的粘贴在里面 #########

- 阅读全文 -