摘要: 转至:http://www.178linux.com/88910 一、请详细描述CentOS系统的启动流程(详细到每个过程系统做了哪些事情) 第一步:POST加电自检 主要实现的功能是检测各个外围硬件设备是否存在而且能够正常运行起来,实现这一自检功能的是固化在主板上的ROM(主要代表为CMOS)芯片 阅读全文
posted @ 2020-07-28 12:33 study_goup 阅读(262) 评论(0) 推荐(0)
摘要: 转至:http://www.178linux.com/88838 1、写一个脚本,判断当前系统上所有用户的shell是否为可登录shell(即用户的shell不是/sbin/nologin);分别这两类用户的个数;通过字符串比较来实现; 2、写一个脚本 (1) 获取当前主机的主机名,保存于hostn 阅读全文
posted @ 2020-07-28 12:32 study_goup 阅读(204) 评论(0) 推荐(0)
摘要: 转至:http://www.178linux.com/88405 1、创建一个10G分区,并格式为ext4文件系统 a) 要求其block大小为2048,预留空间百分比为2,卷标为MYDATA,默认挂载属性包含acl; ~]# mke2fs –t ext4 –b 2048 –m 2 –L MYDAT 阅读全文
posted @ 2020-07-28 12:31 study_goup 阅读(187) 评论(0) 推荐(0)
摘要: 转至:http://www.178linux.com/88406 1、写一个脚本,使用ping命令探测172.16.250.1-172.16.250.254之间的所有主机的在线状态 在线的主机使用绿色显示 不在线的主使用红色显示 #!/bin/bash # for i in {1..254};do 阅读全文
posted @ 2020-07-28 12:29 study_goup 阅读(283) 评论(0) 推荐(0)
摘要: 转至:https://www.jianshu.com/p/b88c7e07aaa9 linux中()、[]、{}、(())、[[]]等各种括号的使用 1、小括号、圆括号() 1.1 单小括号() 命令组。括号中的命令将会新开一个子shell顺序执行,所以括号中的变量不能够被脚本余下的部分使用。括号中 阅读全文
posted @ 2020-07-28 12:26 study_goup 阅读(4305) 评论(0) 推荐(0)
摘要: 转至:https://blog.csdn.net/dj0379/article/details/50946398/ declare -i iv=$svnvlet iv+=1shell中变量自增的实现方法Linux Shell中写循环时,常常要用到变量的自增,现在总结一下整型变量自增的方法。我所知道的 阅读全文
posted @ 2020-07-28 12:24 study_goup 阅读(2853) 评论(0) 推荐(0)
摘要: 转至:https://blog.csdn.net/qq_22083251/article/details/80484176 循环中的重定向 或许你应该在其他脚本中见过下面的这种写法: while read line do … done < file 刚开始看到这种结构时,很难理解< file是如何与 阅读全文
posted @ 2020-07-28 09:14 study_goup 阅读(390) 评论(0) 推荐(0)
摘要: 转至:https://blog.csdn.net/weixin_34408717/article/details/85527305?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~first_rank_v2~ra 阅读全文
posted @ 2020-07-27 15:47 study_goup 阅读(804) 评论(0) 推荐(0)
摘要: 本文原创,转载请标明出处 https://blog.csdn.net/qq2531246791/article/details/89036084 一、 赋予可执行权限 chmod +x /etc/rc.d/rc.local 二、 编辑启动文件 vim /etc/rc.d/rc.local 三、 在  阅读全文
posted @ 2020-07-27 15:32 study_goup 阅读(377) 评论(0) 推荐(0)
摘要: 用shell编写的一个脚本,执行的时候报错:syntax error: unexpected end of file! 发生这种报错有两种原因: 第一种: 如果你是用 windows 系统编写的脚本,那么就有可能是 fileformat 类型不同!可能是 fileformat=dos ,那么你需要把 阅读全文
posted @ 2020-07-27 15:11 study_goup 阅读(5654) 评论(0) 推荐(0)