zoukankan      html  css  js  c++  java
  • 第二天作业

    1.在root目录下实现

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

    [root@server ~]# ll -t > /test.txt
    [root@server ~]# cat /test.txt
    总用量 148
    drwxr-xr-x. 2 root root 4096 7月 18 06:09 dir01

    2.在root目录下

    创建一个test.txt文件,并创建新用户abc。将test.txt文件的用户改为abc,将权限改为-rwxr--r--

    [root@server ~]# touch test.txt
    [root@server ~]# useradd abc
    [root@server ~]# chown abc test.txt
    [root@server ~]# ll test.txt
    -rw-r--r--. 1 abc root 0 7月 18 12:06 test.txt
    [root@server ~]# chmod 744 test.txt
    [root@server ~]# ll test.txt
    -rwxr--r--. 1 abc root 0 7月 18 12:06 test.txt

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

    [root@server ~]# ls -l | grep test.tst
    [root@server ~]# ll test.txt
    -rwxr--r--. 1        abc      root          0            7月 18 12:06   test.txt

    [权限] [连接数][拥有者][用户组][文件容量]     [修改时间]     [文件名]

  • 相关阅读:
    C# 泛型
    css样式优先级
    c# 可空类型
    JS 两个数组合并
    c# 参数传递问题(形参与实参)
    c# JsonReader读取json字符串
    C# 获取当前ip
    swprintf引发的血案
    Struts2解析FreeMarker模板中变量的顺序
    structs2在action中输出
  • 原文地址:https://www.cnblogs.com/Mengjia173/p/7214144.html
Copyright © 2011-2022 走看看