zoukankan      html  css  js  c++  java
  • 7.19 晚作业

    1:在root目录下实现

    文件按照时间排序最新的在前面 并且把结果输出到名为test.txt文件中

    [root@server ~]# ll -t >test.txt
    [root@server ~]# cat test.txt
    总用量 132
    -rw-r--r--. 1 root root 0 7月 19 18:00 test.txt
    -rwxr--r--. 1 abc root 0 7月 19 17:48 abc.txt
    -rw-r--r--. 1 root root 0 7月 19 10:59 eklk
    -rw-r--r--. 1 root root 6 7月 18 20:21 a
    -rw-r--r--. 1 root root 5 7月 18 18:54 test.log
    -rw-r--r--. 1 root root 382 7月 18 18:51 kk
    -rw-r--r--. 1 root root 12 7月 18 18:13 ao
    -rw-r--r--. 1 root root 3 7月 18 14:41 test
    -rw-r--r--. 1 root root 4 7月 18 13:54 bc
    -rw-r--r--. 1 root root 382 7月 17 23:15 tesy.log
    -rw-r--r--. 1 root root 0 7月 17 22:06 aaaaaaaaaa
    -rw-r--r--. 1 root root 0 7月 17 22:04 ad
    -rw-r--r--. 1 root root 0 7月 17 22:01 acb
    -rw-r--r--. 1 root root 0 7月 17 22:01 adada
    -rw-r--r--. 1 root root 0 7月 17 22:01 aqq
    -rw-r--r--. 1 root root 0 7月 17 22:01 arr
    -rw-r--r--. 1 root root 0 7月 17 21:44 add
    -rw-r--r--. 1 root root 0 7月 17 21:43 adac
    -rw-r--r--. 1 root root 0 7月 17 21:43 adae
    -rw-r--r--. 1 root root 0 7月 17 21:43 aea
    drwxr-xr-x. 2 root root 4096 7月 17 20:28 桌面
    drwxr-xr-x. 2 root root 4096 7月 17 18:46 aaa
    drwxr-xr-x. 2 root root 4096 7月 17 11:51 公共的
    drwxr-xr-x. 2 root root 4096 7月 17 11:51 模板

    2:在root目录下创建文件abc.txt 创建用户abc

    将文件拥有者改为abc 文件权限为rwxr--r--

    [root@server ~]# touch abc.txt
    [root@server ~]# useradd abc
    useradd: user 'abc' already exists
    [root@server ~]# useradd abcd
    [root@server ~]# chown abcd abc.txt
    [root@server ~]# chmod 744 abc.txt
    [root@server ~]# ll abc.txt
    -rwxr--r--. 1 abcd root 0 7月 19 18:00 abc.txt

    3:在root下写出ls -l并过滤出abc.txt 这一个文件的命令并解释列出的每一个属性的意义

    [root@server ~]# ll |grep abc.txt
    -rwxr--r--. 1 abcd root 0 7月 19 18:00 abc.txt

    -rwxr--r--权限     1硬连接数  abcd 拥有者 root群组 0字节 后面是时间

  • 相关阅读:
    json-c初探(一)
    Java程序员跳槽的首选面试题最新合集(2021下半年),初中高级程序员!
    R语言版本的bedtools--bedtoolsr
    使用R语言(cpm包)进行序列变点(change point)检测
    三款PHP大马,已解密、去后门
    php 取出数据表数据放入数组并排序
    VimTutor每讲小结
    记录一下c++学习过程
    vmware fusion关闭自动挂起(suspend)的方法
    mac中安装mysqlclient出错error: command 'clang' failed with exit status 1的解决办法
  • 原文地址:https://www.cnblogs.com/luo102154/p/7207584.html
Copyright © 2011-2022 走看看