zoukankan      html  css  js  c++  java
  • 复习

     1.当前目录下有a,b,c三个文件和一个目录Dir
     -分别使用tar,rar,zip命令将三个文件和目录压缩为一个文件
     -将压缩好的文件压缩到/home/itheima目录中
    tar zcvf test.tar.gz a b c Dir/
    tar zxvf test.tar.gz -C /home/itheima
     
    rar a test a b c Dir/ -r
    rar x test.rar /home/itheima
     
    zip myzip a b c Dir/ -r
    unzip myzip.zip -d /home/itheima

     2.写出命令查找宿主目录下文件中含有"hello,world" 字符串的文件,并显示行号
    grep -r "hello,world" ~ -n
    ~ 宿主目录
    3.创建软链接
    ln -s 文件名 软链接的名字
     文件名:使用绝对路径
    4.现有一个文件hello.txt, 文件访问权限为 rwxrw-rw-
     ○ 使用文字设定法将文件所属组和其他人添加执行权限 x
     ○ 使用数字设定法去掉文件所有者的读写权限
     chmod 766 hello
    chmod -600 hello

    chmod go+x hello
    5.写出命令查找宿主目录下文件大于100k小于10M的文件
    find ~ -size +100k -size -10M
    6.将NewDir目录中的内容拷贝到另一个已经存在的空目录(test)
    cp NewDir/*  test -r
    7.删除newDir目录下的所有文件
    rm newDir/* -r
    8.创建test目录,在里面创建aa bb cc三个目录
    mkdir test/aa test/b2 test/cc -p 
  • 相关阅读:
    MongoDB 数组
    MongoDB 内嵌文档
    MongoDB 聚合操作
    MongoDB 文档的删除操作
    MongoDB 文档的更新操作
    MongoDB 文档的查询和插入操作
    MongoDB 安装和可视化工具
    SSIS 容器
    SSISDB2:SSIS工程的操作实例
    Replication:distribution 中一直在运行 waitfor delay @strdelaytime 语句
  • 原文地址:https://www.cnblogs.com/MAPO/p/8456470.html
Copyright © 2011-2022 走看看