作业

[if !supportLists]第1章 [endif]一个EXT4的文件分区,当使用touch test.file命令创建一个新文件时报错,报错的信息是提示磁盘已满,但是采用 df -h 命令查看磁盘大小时,只使用了60%的磁盘空间,为什么会出现这种情况?

解答:

用df -i可以查看到inode已满,大量小文件占满磁盘,用find命令查找小文件并删除

[if !supportLists]第2章 [endif]对名为fido的文件用chmod 551 fido进行修改,则他的许可权是?

解答:

      r-xr-x--x

[if !supportLists]第3章 [endif]文件系统中软硬连接的区别?

区别:

对象硬链接软链接

索引节点Inode相同Inode不同

创建ln 源文件 目标文件In s 源文件 目标文件

对目录不能创建能创建

[if !supportLists]1.    

  [endif]硬链接不可跨文件系统,软链接可以

[if !supportLists]2.    

  [endif]删除软链接,硬链接及源文件无影响

[if !supportLists]3.    

  [endif]删除硬链接,软链接及源文件无影响

[if !supportLists]4.    

  [endif]删除源文件,硬链接无影响,软链接失效

[if !supportLists]5.    

  [endif]删除所有硬链接和原文件,文件才会删除


[if !supportLists]第4章 [endif]Linux开机启动流程详细步骤是什么?系统安装完,忘记密码如何破解

解答:

C6 开机BIOS自检—加载MBR引导—加载GRUB菜单—加载内核—运行init进程—设置运行级别

—加载初始化—根据运行级别加载运行脚本—加载自启动—登录界面

C7 开机BIOS自检—加载MBR引导—加载GRUB菜单—记载内核—运行systemd进程—设置运行级别—记载初始化—并行各种服务—登录界面

[if !supportLists]4.1[endif]开

[if !supportLists]4.2[endif]解答机启动流程

[if !supportLists]4.3[endif]忘记密码破解方式

[if !supportLists]第5章 [endif]请取出系统中所有的用户名及UID,并过滤出不可登录的用户

解答:

[if !supportLists](1)   [endif]cat /etc/passwd|awk -F ':' '{print $1,$3}'

[if !supportLists](2)   [endif]cat /etc/passwd|grep 'nologin'

[if !supportLists]第6章 [endif]请取出eth0网卡的mac地址

解答:

方法一:ifconfigeth0|sed -rn 's#^.*ether(.*)txq.*$#\1#gp'

方法二:ifconfigeth0|awk -F '[ ]+' 'NR==4{print $3}'

[if !supportLists]第7章 [endif]在/home目录下找出3天之前被修改过文件大于20k的文件,并把他们打包到/oldboy/目录下并以当前时间命名

解答:find /home –typef –mtime +3 –size +20k|tar zcf /oldboy/$(date_+%F).tar.gz

[if !supportLists]第8章 [endif]如何在/var目录下找出90天之内未被访问过得文件?

解答:find /var-type f ! -atime -90

[if !supportLists]第9章 [endif]如何使用CRT/Xshell向linux服务器上传下载文件

解答:rz

[if !supportLists]第10章 [endif]如何检查selinux是否开启

解答:getenforce

[if !supportLists]第11章 [endif]文件excel的访问权限为rw-r--r--.现要增加所有用户的执行权限和同组用户的写权限,命令是

解答:chmod a+x g+wexcel

[if !supportLists]第12章 [endif]批量创建20个用户,用户名格式为oldboy1等等,并都设置密码123456该如何实现?

解答:seq 20|sed-r 's#(.*)#useradd ke\1;echo 123456|passwd --stdin ke\1#g'|bash

[if !supportLists]第13章 [endif]/var/www/html/是网站的发布目录。如何每天凌晨0点30对其进行自动备份,写出操作步骤

 解答:

30 00 * * * /bin/sh cp /var/www/html/tmp&>/dev/null

[if !supportLists]第14章 [endif]crontab 在11月份内,每天的早上7点到11点中,每隔2小时执行一次/usr/bin/httpd.sh怎么实现

解答:

00 7-11/2 * 11 * /bin/sh /usr/bin/httpd.sh &>/dev/null

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容