1、请用命令查出ifconfig命令程序的绝对路径[root@localhost ~]# which ifconfig

答:/usr/sbin/ifconfig

2、请用命令展示以下命令哪些是内部命令,哪些是外部命令?(cd \ pwd \ ls \ ifconfig \ du)[root@localhost ~]#

答:cd 是 shell 内嵌(由此可见该命令cd'为内部命令)

      pwd 是 shell 内嵌(由此可见该命令pwd为内部命令)

      ls 是 `ls --color=auto' 的别名(由此可见该命令ls为外部命令)

      ifconfig 是 /usr/sbin/ifconfig (由此可见该命令ifconfig为外部命令)

      du 是 /usr/bin/du (由此可见该命令du为外部命令)

3、请在/下创建目录abc请在/下创建目录/liangjian/liyunlong/weiheshang/duanpeng请在/abc下一次创建1000个目录,名字自己拟定。

答:[root@localhost ~]# mkdir /abc

[root@localhost /]# mkdir -pv /liangjian/liyunlong/weiheshang/duanpeng

mkdir: 已创建目录 "/liangjian"

mkdir: 已创建目录 "/liangjian/liyunlong"

mkdir: 已创建目录 "/liangjian/liyunlong/weiheshang"

mkdir: 已创建目录 "/liangjian/liyunlong/weiheshang/duanpeng"

[root@localhost liyunlong]# mkdir /abc/{1..1000}

4、请用绝对路径方式切换到/liangjian/liyunlong/weiheshang/duanpeng 目录下并用pwd查看当前的路径,请用上级目录名".."方式切换到 /liangjian/liyunlong

答:[root@localhost /]# cd /liangjian/liyunlong/weiheshang/duanpeng

[root@localhost duanpeng]# pwd

/liangjian/liyunlong/weiheshang/duanpeng

[root@localhost duanpeng]# cd ..

[root@localhost weiheshang]# cd ..

[root@localhost liyunlong]# pwd

/liangjian/liyunlong

[root@localhost liyunlong]#

5、请一次删除/abc下一次创建的1000个目录,请在/abc下用touch再创建20个以stu开头的普通可读文档,文档后缀为.txt

答:[root@localhost ~]# rm -rf /abc/{1..1000}

[root@localhost ~]# ls /abc/

[root@localhost ~]#

[root@localhost ~]# touch /abc/stu{1..20}.txt

[root@localhost ~]# ls /abc/

stu10.txt  stu12.txt  stu14.txt  stu16.txt  stu18.txt  stu1.txt   stu2.txt  stu4.txt  stu6.txt  stu8.txt

stu11.txt  stu13.txt  stu15.txt  stu17.txt  stu19.txt  stu20.txt  stu3.txt  stu5.txt  stu7.txt  stu9.txt

6、请用cp命令将/boot/目录下以vmlinuz开头的文件拷贝到/abc下,并以查看他们占磁盘的空间大小。

答:[root@localhost ~]# cp /boot/vmlinuz* /abc/

[root@localhost ~]# ls /abc/

stu10.txt  stu14.txt  stu18.txt  stu2.txt  stu6.txt  vmlinuz-0-rescue-33213c366c264aabbfe9dec78d0c4721

stu11.txt  stu15.txt  stu19.txt  stu3.txt  stu7.txt  vmlinuz-3.10.0-693.el7.x86_64

stu12.txt  stu16.txt  stu1.txt   stu4.txt  stu8.txt

stu13.txt  stu17.txt  stu20.txt  stu5.txt  stu9.txt

[root@localhost ~]# du -h /boot/vmlinuz*

5.7M /boot/vmlinuz-0-rescue-33213c366c264aabbfe9dec78d0c4721

5.7M /boot/vmlinuz-3.10.0-693.el7.x86_64

7、将其中一个vmlinuz开头的文件改名为kgc,另外一个剪切到/tmp目录下

答:[root@localhost ~]# mv /abc/vmlinuz-0-rescue-33213c366c264aabbfe9dec78d0c4721 /abc/kgc

[root@localhost ~]# ls /abc/

kgc        stu12.txt  stu15.txt  stu18.txt  stu20.txt  stu4.txt  stu7.txt  vmlinuz-3.10.0-693.el7.x86_64

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

[root@localhost ~]# mv /boot/vmlinuz-3.10.0-693.el7.x86_64 /tmp/

8、查看/tmp/目录下以vmlinuz开头文件的详细状态信息。

答:[root@localhost ~]# stat /tmp/vmlinuz*

文件:"/tmp/vmlinuz-3.10.0-693.el7.x86_64"

大小:5877760    块:11480      IO 块:4096   普通文件

设备:fd00h/64768d Inode:33677539    硬链接:1

权限:(0755/-rwxr-xr-x)  Uid:(    0/    root)   Gid:(    0/    root)

环境:system_u:object_r:boot_t:s0

最近访问:2019-07-23 10:10:02.218661271 +0800

最近更改:2017-08-23 05:21:49.000000000 +0800

最近改动:2019-07-24 09:33:12.141757314 +0800

创建时间:-

9、用find命令查找/tmp目录下以vmlinuz开头及大小超过1M的文件

答:[root@localhost ~]# find /tmp/ -size +1M -a -name vmlinuz*

/tmp/vmlinuz-3.10.0-693.el7.x86_64

chapter01的更多相关文章

  1. springboot-shiro chapter01——创建springboot webmvc环境

    简介:本章提供了springboot简单例子,主要包含以下内容 1.pom.xml依赖资源 2.springboot配置 3.web应用spring mvc 环境: IDEA15+ JDK1.8+ M ...

  2. 【GISER&&Painter】Chapter01:WebGL渲染初体验

    基于上一篇OpenGL的渲染原理,这两周又陆续接触了一些关于WebGL绘图的一些内容,因为刚入门,很多东西又很晦涩,所以特意花了小半天的时间整理了一下,特此记录. 零  画一个多边形吧! 把一个多边形 ...

  3. chapter01作业

    1. 请用命令查出ifconfig命令程序的绝对路径 [root@localhost chen]# which ifconfig /usr/sbin/ifconfig 2.请用命令展示以下命令哪些是内 ...

  4. chapter01图像基本操作

    刚刚开始学习opencv,来记录一下自己的学习笔记,也向各位大牛虚心求教 一.图片的基本知识 只要是彩色的图片都有三个颜色通道,即RGB,用三个矩阵来表示. 三个矩阵的同一个坐标位置上的数值描述的是一 ...

  5. Atitit.可视化与报表原理与概论

    Atitit.可视化与报表原理与概论 1.  信息可视化1 2. Gui可视化1 3. 报表系统(三大图表,金字塔,组织结构图等)1 4. <可视化数据>目录3 5. 可视化的具体实现(c ...

  6. Epub基础知识介绍

    转载自:http://www.cnblogs.com/linlf03/archive/2011/12/13/2286218.html 一.什么是epub epub是一个完全开放和免费的电子书标准.它可 ...

  7. Linux(Ubuntu 14.04) setting up OpenGL

    1. Install c/c++ compilation package. 2. install openGL and freeGlut library sudo apt-get install me ...

  8. GitBook制作电子书详细教程(命令行版)

    GitBook 是一款基于 Node.js 开发的开源的工具,可以通过命令行的方式创建电子书项目,再使用 MarkDown 编写电子书内容,然后生成 PDF.ePub.mobi 格式的电子书,或生成一 ...

  9. 总结六条对我们学习Linux系统有用的忠告

    接触linux需要的是端正自己的态度,这个玩意可不是一天两天就能拿得下的.学习个基础,能装系统.能装常见服务.能编译.能配置存储空间.能配置系统参数.能简单查看系统负载等基本够用.但这些只保证能做机房 ...

随机推荐

  1. spark 源码分析之二 -- SparkContext 的初始化过程

    创建或使用现有Session 从Spark 2.0 开始,引入了 SparkSession的概念,创建或使用已有的session 代码如下: val spark = SparkSession .bui ...

  2. PATA 1011 World Cup Betting (20)

    1011. World Cup Betting (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Wit ...

  3. Centos7 系统初试化脚本

    系统初始化设置 # 设置主机名,永久修改,再次登陆生效 hostnamectl set-hostname xxxxx # 安装eprl源,常用命令 yum install -y wget && ...

  4. C++ hdu 例题:不要62 题解

    例题:不要62 同步数位DP 需要统计区间[l,r]的满足题意的数的个数,这往往可以转换成求[0,r]-[0,l) 基本思想与方法 有了上述性质,我们就可以从高到低枚举第一次<n对应位是哪一位. ...

  5. Spring入门配置(一) - IOC

    一.初始命名空间配置 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="h ...

  6. POJ 1651:Multiplication Puzzle(区间DP)

    http://poj.org/problem?id=1651 题意:给出n个数字,每取中间一个数,就会使得权值加上中间这个数和两边的乘积,求取剩两个数最少的权值是多少. 思路:区间dp. 一开始想了挺 ...

  7. 02(a)多元无约束优化问题

    2.1 基本优化问题 $\operatorname{minimize}\text{    }f(x)\text{       for   }x\in {{R}^{n}}$ 解决无约束优化问题的一般步骤 ...

  8. Flags Over Objects

    The Flags Over Objects anti-pattern occurs when behavior is written outside of an object by inspecti ...

  9. Redis 使用C#程序操作Redis

    一.安装操作所需Nuget包 二.写入 redis只是按Key值设置过期时间,不是对value内部的某些值设过期 2.1 string类型 /// <summary> /// 向Redis ...

  10. 剑指offer第二版-总结:排序算法

    1.排序算法比较: 2.java实现 快排: /** * 快排 * * @since 2019年2月26日 下午1:37:34 * @author xuchao */ public class Qui ...