chapter01作业
1、 请用命令查出ifconfig命令程序的绝对路径
[root@localhost chen]# which ifconfig
/usr/sbin/ifconfig
2、请用命令展示以下命令哪些是内部命令,哪些是外部命令?(cd \ pwd \ ls \ ifconfig \ du)
[root@localhost chen]# type cd
cd 是 shell 内嵌(由此可见该命令cd为内部命令)
[root@localhost chen]# type pwd
pwd 是 shell 内嵌(由此可见该命令shell为内部命令)
[root@localhost chen]# type ls
ls 是 `ls --color=auto' 的别名(由此可见该命令ls为外部命令)
[root@localhost chen]# type ifconfig
ifconfig 是 /usr/sbin/ifconfig(由此可见该命令ifconfig为外部命令)
[root@localhost chen]# type du
du 是 /usr/bin/du(由此可见该命令du为外部命令)
3.请在/下创建目录abc
[root@localhost chen]# mkdir /abc
[root@localhost chen]# ls /
101 bin dev home lib64 mnt proc run srv tmp var
abc boot etc lib media opt root sbin sys usr
请在/下创建目录/liangjian/liyunlong/weiheshang/duanpeng
[root@localhost chen]# mkdir -pv /liangjian/liyunlong/weiheshang/duanpeng
mkdir: 已创建目录 "/liangjian"
mkdir: 已创建目录 "/liangjian/liyunlong"
mkdir: 已创建目录 "/liangjian/liyunlong/weiheshang"
mkdir: 已创建目录 "/liangjian/liyunlong/weiheshang/duanpeng"
[root@localhost chen]# ls -Rh /liangjian
/liangjian:
liyunlong
/liangjian/liyunlong:
weiheshang
/liangjian/liyunlong/weiheshang:
duanpeng
/liangjian/liyunlong/weiheshang/duanpeng:
请在/abc下一次创建1000个目录,名字自己拟定。
[root@localhost chen]# mkdir -p /abc/a{1..1000}
[root@localhost chen]# ls /abc
a1 a168 a237 a306 a376 a445 a514 a584 a653 a722 a792 a861 a930
a10 a100 a17 a239 a308 a378 a447 a516 a586 a655 a724 a794 a1000 a170 a24 a309 a379 a448 a517 a587 a656 a725 a795 a864
…… a166 a235 a304 a374 a443 a512 a582 a651 a720 a790 a86 a929 a999
a167 a236 a305 a375 a444 a513 a583 a652 a721 a791 a860 a93
4、请用绝对路径方式切换到/liangjian/liyunlong/weiheshang/duanpeng 目录下
并用pwd查看当前的路径,请用上级目录名".."方式切换到 /liangjian/liyunlong下
[root@localhost duanpeng]# cd /liangjian/liyunlong/weiheshang/duanpeng
[root@localhost duanpeng]# pwd
/liangjian/liyunlong/weiheshang/duanpeng
[root@localhost duanpeng]# cd ../../
[root@localhost liyunlong]# pwd
/liangjian/liyunlong
5、请一次删除/abc下一次创建的1000个目录,请在/abc下用touch再创建20个以stu开头的普通可读文档,文档后缀为.txt
[root@localhost liyunlong]# rm -rf /abc/a*
[root@localhost liyunlong]# touch /abc/stu{1..20}.txt
[root@localhost liyunlong]# ls /abc/
stu10.txt stu13.txt stu16.txt stu19.txt stu2.txt stu5.txt stu8.txt
stu11.txt stu14.txt stu17.txt stu1.txt stu3.txt stu6.txt stu9.txt
stu12.txt stu15.txt stu18.txt stu20.txt stu4.txt stu7.txt
6、请用cp命令将/boot/目录下以vmlinuz开头的文件拷贝到/abc下,并以查看他们占磁盘的空间大小。
[root@localhost ~]# ls /boot/
config-3.10.0-862.el7.x86_64
efi
grub
grub2
initramfs-0-rescue-a98e3946315a4366a69c9cccd8aca211.img
initramfs-3.10.0-862.el7.x86_64.img
symvers-3.10.0-862.el7.x86_64.gz
System.map-3.10.0-862.el7.x86_64
vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
vmlinuz-3.10.0-862.el7.x86_64
[root@localhost ~]# cp /boot/vmlinuz* /abc
[root@localhost ~]# ls /abc
stu10.txt stu16.txt stu2.txt stu8.txt
stu11.txt stu17.txt stu3.txt stu9.txt
stu12.txt stu18.txt stu4.txt vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
stu13.txt stu19.txt stu5.txt vmlinuz-3.10.0-862.el7.x86_64
stu14.txt stu1.txt stu6.txt
stu15.txt stu20.txt stu7.txt
[root@localhost ~]# du -ah /abc/
0 /abc/stu1.txt
0 /abc/stu2.txt
0 /abc/stu3.txt
0 /abc/stu4.txt
0 /abc/stu5.txt
0 /abc/stu6.txt
0 /abc/stu7.txt
0 /abc/stu8.txt
0 /abc/stu9.txt
0 /abc/stu10.txt
0 /abc/stu11.txt
0 /abc/stu12.txt
0 /abc/stu13.txt
0 /abc/stu14.txt
0 /abc/stu15.txt
0 /abc/stu16.txt
0 /abc/stu17.txt
0 /abc/stu18.txt
0 /abc/stu19.txt
0 /abc/stu20.txt
6.0M /abc/vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
6.0M /abc/vmlinuz-3.10.0-862.el7.x86_64
12M /abc/
7、将其中一个vmlinuz开头的文件改名为kgc,另外一个剪切到/tmp目录下。
[root@localhost abc]# ls
stu10.txt stu16.txt stu2.txt stu8.txt
stu11.txt stu17.txt stu3.txt stu9.txt
stu12.txt stu18.txt stu4.txt vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
stu13.txt stu19.txt stu5.txt vmlinuz-3.10.0-862.el7.x86_64
stu14.txt stu1.txt stu6.txt
stu15.txt stu20.txt stu7.txt
[root@localhost abc]# mv vmlinuz-3.10.0-862.el7.x86_64 kgc
[root@localhost abc]# ls
kgc stu15.txt stu20.txt stu7.txt
stu10.txt stu16.txt stu2.txt stu8.txt
stu11.txt stu17.txt stu3.txt stu9.txt
stu12.txt stu18.txt stu4.txt vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
stu13.txt stu19.txt stu5.txt
stu14.txt stu1.txt stu6.txt
[root@localhost abc]# mv vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211 /tmp/
[root@localhost abc]# ls /tmp/
…
vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
8、查看/tmp/目录下以vmlinuz开头文件的详细状态信息。
[root@localhost abc]# stat /tmp/vmlinuz*
文件:"/tmp/vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211"
大小:6224704 块:12160 IO 块:4096 普通文件
设备:fd00h/64768d Inode:102882318 硬链接:1
权限:(0755/-rwxr-xr-x) Uid:( 0/ root) Gid:( 0/ root)
最近访问:2019-07-23 20:01:47.568656306 +0800
最近更改:2019-07-23 20:01:48.051660464 +0800
最近改动:2019-07-23 20:11:48.088912567 +0800
创建时间:-
9、用find命令查找/tmp目录下以vmlinuz开头及大小超过1M的文件
[root@localhost abc]# find /tmp -name "vmlinuz*" -a -size +1M
/tmp/vmlinuz-0-rescue-a98e3946315a4366a69c9cccd8aca211
chapter01作业的更多相关文章
- python10作业思路及源码:类Fabric主机管理程序开发(仅供参考)
类Fabric主机管理程序开发 一,作业要求 1, 运行程序列出主机组或者主机列表(已完成) 2,选择指定主机或主机组(已完成) 3,选择主机或主机组传送文件(上传/下载)(已完成) 4,充分使用多线 ...
- SQLServer2005创建定时作业任务
SQLServer定时作业任务:即数据库自动按照定时执行的作业任务,具有周期性不需要人工干预的特点 创建步骤:(使用最高权限的账户登录--sa) 一.启动SQL Server代理(SQL Server ...
- 使用T-SQL找出执行时间过长的作业
有些时候,有些作业遇到问题执行时间过长,因此我写了一个脚本可以根据历史记录,找出执行时间过长的作业,在监控中就可以及时发现这些作业并尽早解决,代码如下: SELECT sj.name , ...
- T-SQL检查停止的复制作业代理,并启动
有时候搭建的复制在作业比较多的时候,会因为某些情况导致代理停止或出错,如果分发代理时间停止稍微过长可能导致复制延期,从而需要从新初始化复制,带来问题.因此我写了一个脚本定期检查处于停止状态的分 ...
- Python09作业思路及源码:高级FTP服务器开发(仅供参考)
高级FTP服务器开发 一,作业要求 高级FTP服务器开发 用户加密认证(完成) 多用户同时登陆(完成) 每个用户有不同家目录且只能访问自己的家目录(完成) 对用户进行磁盘配额,不同用户配额可不同(完成 ...
- 个人作业week3——代码复审
1. 软件工程师的成长 感想 看了这么多博客,收获颇丰.一方面是对大牛们的计算机之路有了一定的了解,另一方面还是态度最重要,或者说用不用功最重要.这些博客里好些都是九几年或者零几年就开始学习编 ...
- 个人作业-week2:关于微软必应词典的案例分析
第一部分 调研,评测 评测基于微软必应词典Android5.2.2客户端,手机型号为MI NOTE LTE,Android版本为6.0.1. 软件bug:关于这方面,其实有一些疑问.因为相对于市面上其 ...
- 软件工程第二次作业——git的使用
1. 参照 http://www.cnblogs.com/xinz/p/3803109.html 的第一题,每人建立一个GitHub账号,组长建立一个Project,将本组成员纳入此Porject中的 ...
- hadoop作业调度策略
一个Mapreduce作业是通过JobClient向master的JobTasker提交的(JobTasker一直在等待JobClient通过RPC协议提交作业),JobTasker接到JobClie ...
随机推荐
- l论文查重平台
推荐大家一个靠谱的论文检测平台.重复的部分有详细出处以及具体修改意见,能直接在文章上做修改,全部改完一键下载就搞定了.怕麻烦的话,还能用它自带的降重功能.哦对了,他们现在正在做毕业季活动, 赠送很多免 ...
- 附008.Kubernetes TLS证书介绍及创建
一 Kubernetes证书 1.1 TLS Kubernetes系统的各个组件需要使用TLS证书对其通信加密以及授权认证,建议在部署之前先生成相关的TLS证书. 1.2 CA证书创建方式 kuber ...
- 获取Spring中的Bean
1.Utils工具类 package com.xxx.common.helper; import org.springframework.beans.BeansException; import or ...
- js中新增动态属性
var cc = 'hell' var mm = { [cc](){ alert(33) } } mm.hell() 使用的就是数组形式
- 记2017青岛ICPC
2017青岛ICPC 11月4日 早上很早到达了青岛,然后去报道,走了好久的校园,穿的很少冷得瑟瑟发抖.中午教练请吃大餐,吃完饭就去热身赛了. 开幕式的时候,教练作为教练代表讲话,感觉周围的队伍看过来 ...
- Codeforces 348B:Apple Tree(DFS+LCM+思维)
http://codeforces.com/contest/348/problem/B 题意:给一棵树,每个叶子结点有w[i]个苹果,每个子树的苹果数量为该子树所有叶子结点苹果数量之和,要使得每个结点 ...
- mpvue开发微信小程序
前段时间,美团开源了mpvue这个项目,使得我们又多了一种用来开发小程序的框架选项.由于mpvue框架是完全基于Vue框架的(重写了其runtime和compiler),因此在用法上面是高度和Vue一 ...
- android_layout_linearlayout(一)
这几天一直在研究线性布局这块,记录下一些研究心得,作为参考之用. 一.金刚钻:(线性布局,英文名 linearLayout) 布局xml文件中统大者是一个线性布局,它的长宽都已经fill_parent ...
- 用Python玩数据-笔记整理-第二章-练习与测试
课间练习: 经典问题的Python编程 按公式:C= 5/9×(F-32) ,将华氏温度转换成摄氏温度,并产生一张华氏0-300度与对应的摄氏温度之间的对照表(每隔20度输出一次) 验证命题:如果一 ...
- R030---手把手教程:你有一条RPA发送的工资条待查收
一.缘起 前2天写了<R029---简述:用UiPath实现RPA(工作流程自动化)(基础知识篇)>,本篇作为补充. 实战出真知,以做代学,下面以一个HR的真实场景举例实践,用UiPat ...