会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
人生值得
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2020年11月10日
九、Linux系统启动管理与密码破解
摘要: ##1.编写脚本,接受二个位置参数,magedu和/www,判断系统是否有magedu,如果没有则自动创建magedu用户,并自动设置家目录为/www。 [root@localhost /data]#./createusertest.sh Please Input 2 Args,Usage:./cr
阅读全文
posted @ 2020-11-10 13:26 人生值得
阅读(216)
评论(0)
推荐(0)
2020年11月6日
16.文本处理之awk--案例分析
摘要: ##1.文件host_list.log 如下格式,请提取”.magedu.com”前面的主机名部分并写入到回到该文件中。 1 www.magedu.com 2 blog.magedu.com 3 study.magedu.com 4 linux.magedu.com 5 python.magedu.
阅读全文
posted @ 2020-11-06 17:28 人生值得
阅读(212)
评论(0)
推荐(0)
2020年10月21日
15.进程和计划任务
摘要: ##1.每周的工作日1:30,将/etc备份至/backup目录中,保存的文件名称格式为“etcbak-yyyy-mm-ddHH.tar.xz”,其中日期是前一天的时间。 [root@localhost /data/scripts]#cat etc_backup.sh #!/bin/bash #**
阅读全文
posted @ 2020-10-21 17:09 人生值得
阅读(117)
评论(0)
推荐(0)
2020年10月16日
八、shell脚本进阶、系统进程与计划。
摘要: ##1.显示统计占用系统内存最多的进程,并排序. [root@localhost ~]#ps aux --sort -rss |head -5 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 6311 0.0 0.6 57381
阅读全文
posted @ 2020-10-16 16:19 人生值得
阅读(167)
评论(0)
推荐(0)
14.Shell脚本编程进阶之函数。
摘要: ##1.编写函数,实现OS的版本判断。 [root@localhost /data/scripts]#bash os.sh os version is 7 [root@localhost /data/scripts]#cat os.sh #!/bin/bash #******************
阅读全文
posted @ 2020-10-16 14:02 人生值得
阅读(188)
评论(0)
推荐(0)
2020年9月29日
13.3-Shell脚本进阶之until、shift
摘要: ##1.每隔3秒钟到系统上获取已经登录的用户的信息;如果发现用户hacker登录,则将登录时间和主机记录于日志/var/log/login.log中,并退出脚本。 [root@localhost /data/scripts]#bash !* bash while_hacker.sh ^C [root
阅读全文
posted @ 2020-09-29 15:03 人生值得
阅读(245)
评论(0)
推荐(0)
2020年9月28日
13.2-Shell脚本进阶之while循环
摘要: ##1.编写脚本,求100以内所有正奇数之和。 [root@localhost /data/scripts]#bash while_sum.sh 100以内所有正奇数之和为:2500 [root@localhost /data/scripts]#cat !* cat while_sum.sh #!/
阅读全文
posted @ 2020-09-28 16:33 人生值得
阅读(416)
评论(0)
推荐(0)
2020年9月27日
13.1-Shell脚本进阶之for循环
摘要: ##1.判断/var/目录下所有文件的类型 [root@localhost /data/scripts]#bash for_var.sh Please input directory: /var file /var/adm is Directory file /var/cache is Direct
阅读全文
posted @ 2020-09-27 15:34 人生值得
阅读(369)
评论(0)
推荐(0)
2020年9月21日
七、网络协议
摘要: ##1.简述osi七层模型和TCP/IP五层模型。 OSI七层模型 OSI七层模型于1984年,由ISO(国际标准化组织)发布,它定义了网络互联的7层框架,即OSI开放系统互连参考模型。 OSI七层参考模型的各个层次的划分遵循下列原则: 同一层中的各网络节点都有相同的层次结构,具有同样的功能。 同一
阅读全文
posted @ 2020-09-21 11:07 人生值得
阅读(474)
评论(0)
推荐(0)
2020年9月14日
六、Linux 系统yum仓库与硬盘挂载
摘要: ##1.自建yum仓库,分别为网络源和本地源。 备份yum源配置 [root@centos6 ~]#ll /etc/yum.repos.d/ total 28 -rw-r--r--. 1 root root 1991 Jun 26 2018 CentOS-Base.repo -rw-r--r--.
阅读全文
posted @ 2020-09-14 21:28 人生值得
阅读(682)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告