第二天作业

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

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

posted @ 2017-07-20 19:50  Mengjia~  阅读(176)  评论(0编辑  收藏  举报