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字节 后面是时间

  • 相关阅读:
    74. Search a 2D Matrix(js)
    73. Set Matrix Zeroes(js)
    72. Edit Distance(js)
    71. Simplify Path(js)
    兼容各种浏览器版本的事件绑定函数?
    浏览器兼容性问题
    柯里化函数
    token登录验证机制
    vue懒加载
    在Vue中使用了Swiper ,动态从后台获取数据的之后,swiper滑动失效??
  • 原文地址:https://www.cnblogs.com/luo102154/p/7207584.html
Copyright © 2011-2022 走看看