zoukankan      html  css  js  c++  java
  • 7.24

    1、请用命令查出ifconfig命令程序的绝对路径

    [root@localhost ~]# which ifconfig

    /usr/sbin/ifconfig

    2、请用命令展示以下命令哪些是内部命令,哪些是外部命令?(cd pwd ls ifconfig du)

    [root@localhost ~]# type cd

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

    root@localhost ~]# type pwd

    pwd 是 shell 内嵌

    [root@localhost ~]# type ls

    ls 是 `ls --color=auto' 的别名

    [root@localhost ~]# type ifconfig

    ifconfig 是 /usr/sbin/ifconfig

    [root@localhost ~]# type du

    du 是 /usr/bin/du

    3、请在/下创建目录abc

    [root@localhost ~]# mkdir abc

    [root@localhost ~]# ls -a

    .   aaa  anaconda-ks.cfg  .bash_logout   .bashrc  .config  .dbus      .ICEauthority         .local   .Xauthority  模板  图片  下载  桌面

    ..  abc  .bash_history    .bash_profile  .cache   .cshrc   .esd_auth  initial-setup-ks.cfg  .tcshrc  公共         视频  文档  音乐

       请在/下创建目录/liangjian/liyunlong/weiheshang/duanpeng

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

    mkdir: 已创建目录 "/liangjian"

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

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

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

    [root@localhost ~]#

       请在/abc下一次创建1000个目录,名字自己拟定。

    [root@localhost ~]# cd abc/

    [root@localhost abc]# mkdir -pv {1..1000}h

    mkdir: 已创建目录 "1h"

    [root@localhost ~]# cd abc/

    [root@localhost abc]# mkdir -pv {1..1000}h

    mkdir: 已创建目录 "1h"

    4、请用绝对路径方式切换到/liangjian/liyunlong/weiheshang/duanpeng 目录下

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

    [root@localhost /]# cd /

    [root@localhost /]# cd ..

    [root@localhost /]# cd /liangjian

    [root@localhost liangjian]# cd/liangjian/liyunlong/

    -bash: cd/liangjian/liyunlong/: 没有那个文件或目录

    [root@localhost liangjian]# cd /liangjian/liyunlong

    [root@localhost liyunlong]# cd /liangjian/liyunlong/weiheshang/

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

    [root@localhost duanpeng]#

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

    [root@localhost abc]# rm -rf {1..1000}h

    [root@localhost abc]# ls -a

    .  ..  abc

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

    [root@localhost abc]# ls -a

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

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

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

    [root@localhost boot]# cp -rf /boot/ /abc/

    [root@localhost boot]# ls

    [root@localhost boot]# ls -a

    .  ..

    [root@localhost boot]# du /abc

    4       /abc/grub

    0       /abc/grub2/themes/system

    [root@localhost boot]# du /abc

    4       /abc/grub

    0       /abc/grub2/themes/syste

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

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

    [root@localhost tmp]# stat vmlinuz-3.10.0.957.el7*86_64

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

    [root@localhost tmp]# find -name "vml*" -a -size +1M

    [root@localhost tmp]# ls-a

    bash: ls-a: 未找到命令...

    [root@localhost tmp]# ls

    anaconda.log        ssh-PJxGbU9FJ9Fm                                                              systemd-private-a407566539374733a018c8ecefdc70ec-vmtoolsd.service-TGtehB

    hsperfdata_root     storage.log                                                                   tracker-extract-files.0

    hsperfdata_tom      systemd-private-007937868d334777983f57fd8970e7bf-colord.service-HGxYPl        tracker-extract-files.1000

    ifcfg.log           systemd-private-007937868d334777983f57fd8970e7bf-cups.service-r02Yxm          yum.log

    ks-script-E30nbD    systemd-private-007937868d334777983f57fd8970e7bf-rtkit-daemon.service-QHSVae  yum_save_tx.2019-07-23.10-11.uEXZSa.yumtx

    packaging.log       systemd-private-007937868d334777983f57fd8970e7bf-vmtoolsd.service-vu0Ons      yum_save_tx.2019-07-23.10-19.NCU918.yumtx

    program.log         systemd-private-a407566539374733a018c8ecefdc70ec-colord.service-w1iAHu        yum_save_tx.2019-07-23.10-19.WcTHSl.yumtx

    sensitive-info.log  systemd-private-a407566539374733a018c8ecefdc70ec-cups.service-rTDe8N          yum_save_tx.2019-07-23.10-19.X03uz2.yumtx

    ssh-lxata3raNzhf    systemd-private-a407566539374733a018c8ecefdc70ec-rtkit-daemon.service-LrrcAF  yum_save_tx.2019-07-24.08-28.IrIuSb.yumtx

    [root@localhost tmp]#

  • 相关阅读:
    疫情环境下的网络学习笔记 python 5.8 数据库入门终章
    疫情环境下的网络学习笔记 python 5.7 navicat数据库,例题,sql注入
    疫情环境下的网络学习笔记 python 5.6 暂时看看
    疫情环境下的网络学习笔记 python 5.5 MYSql 表关系,外键
    疫情环境下的网络学习笔记 python 5.4 数据库基础
    疫情环境下的网络学习笔记 python 4.30 初识数据库
    疫情环境下的网络学习笔记 python 4.29 网络小项目
    XJOI 夏令营501-511测试11 游戏
    XJOI 夏令营501-511测试11 统计方案
    CF1197D Yet Another Subarray Problem
  • 原文地址:https://www.cnblogs.com/zcdhhh/p/11236496.html
Copyright © 2011-2022 走看看