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

  • 相关阅读:
    【UNR #1】火车管理
    NOIP2018保卫王国
    [SCOI2015]国旗计划[Wf2014]Surveillance
    [TJOI2015]线性代数(最小割)
    [AH2017/HNOI2017]礼物(FFT)
    BZOJ5093图的价值(斯特林数)
    [NOI2018]你的名字(后缀自动机+线段树)
    [SDOI2015]序列统计(多项式快速幂)
    [NOI2014]购票(斜率优化+线段树)
    [CQOI2017]小Q的表格(数论+分块)
  • 原文地址:https://www.cnblogs.com/luo102154/p/7207584.html
Copyright © 2011-2022 走看看