摘要: 1、编写脚本实现登陆远程主机。(使用expect和shell脚本两种形式)。 使用expect: [root@Centos8 ~]# cat ssh-expect.sh#!/usr/bin/expectset ip [lindex $argv 0]set user [lindex $argv 1]s 阅读全文
posted @ 2021-12-27 23:48 Kevin0557 阅读(35) 评论(0) 推荐(0)
摘要: 1、自建yum仓库,分别为网络源和本地源 2、编译安装http2.4,实现可以正常访问,并将编译步骤和结果提交。 1、关闭防火墙,关闭Selinux 2、安装相关软件包 3、下载并解压httpd-2.4.50.tar.bz2软件包 wget https://repo.huaweicloud.com/ 阅读全文
posted @ 2021-12-12 20:42 Kevin0557 阅读(29) 评论(0) 推荐(0)
摘要: 1、统计出/etc/passwd文件中其默认shell为非/sbin/nologin的用户个数,并将用户都显示出来 echo "/etc/passwd文件中其默认shell为非/sbin/nologin的用户个数:"`cat /etc/passwd |grep -v -c '/sbin/nologi 阅读全文
posted @ 2021-12-05 19:26 Kevin0557 阅读(40) 评论(0) 推荐(0)
摘要: 1、显示/etc目录下,以非字母开头,后面跟了一个字母以及其它任意长度任意字符的文件或目录 1、ls /etc/ | grep '^[^[:alpha:]][[:alpha:]].*' 2、ls /etc/ | grep '^[^a-zA-Z][a-zA-Z].*' 2、复制/etc目录下所有以p开 阅读全文
posted @ 2021-11-28 22:16 Kevin0557 阅读(24) 评论(0) 推荐(0)