第十九天--第二十天
第十九天--第二十天
1.使用awk 打印 passwd 第二行
awk 'NR==2' /etc/passwd
2.统计/etc/services文件中有井号开头的行
grep -c '^#' /etc/services
或者
awk '/^#{c++} END{print c}' /etc/services
3.使用查询file abc结尾的行
grep 'abc$' file
awk '/abc/' file
[root@master ~]# grep 'abc$' file
abc
sdjkfhoedskakabc
abc
abc
[root@master ~]# awk '/abc/' file
abc
sdjkfhoedskakabc
abc
abceoiuohierheih
abc
4.总结:awk命令中$符号用法
awk '{print $1}' 打印每一行的第一个字段
awk -F ":" '{print $1,$4}' /etc/passwd -F 指定分隔符为冒号,以冒号 (:) 作为字段分隔符来处理 /etc/passwd 文件,并打印出每一行的第一个和第四个字段。
-
使用awk 取/etc/passwd 第一列数据
awk '{print $1}' /etc/passwd 通常第一条命令就可以取出来了,但是如果遇到了awk没有正确把输入行分割成字段,就需要用下面这条命令了 awk -F: '{print $1}' /etc/passwd 运行结果如下: [root@master ~]# awk '{print $1}' /etc/passwd root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin operator:x:11:0:operator:/root:/sbin/nologin games:x:12:100:games:/usr/games:/sbin/nologin ftp:x:14:50:FTP nobody:x:99:99:Nobody:/:/sbin/nologin avahi-autoipd:x:170:170:Avahi dbus:x:81:81:System polkitd:x:999:998:User tss:x:59:59:Account postfix:x:89:89::/var/spool/postfix:/sbin/nologin sshd:x:74:74:Privilege-separated wang:x:1000:1000:wang:/home/wang:/bin/bash systemd-network:x:192:192:systemd it101:x:1001:1001::/home/it101:/bin/bash it1:x:1002:1002::/home/it1:/bin/bash it2:x:1003:1003::/home/it2:/bin/bash it3:x:1004:1004::/home/it3:/bin/bash it4:x:1005:1005::/home/it4:/bin/bash it5:x:1006:1006::/home/it5:/bin/bash it6:x:1007:1007::/home/it6:/bin/bash it7:x:1008:1008::/home/it7:/bin/bash it8:x:1009:1009::/home/it8:/bin/bash it9:x:1010:1010::/home/it9:/bin/bash it10:x:1011:1011::/home/it10:/bin/bash it11:x:1012:1012::/home/it11:/bin/bash it12:x:1013:1013::/home/it12:/bin/bash it13:x:1014:1014::/home/it13:/bin/bash it14:x:1015:1015::/home/it14:/bin/bash it15:x:1016:1016::/home/it15:/bin/bash it16:x:1017:1017::/home/it16:/bin/bash it17:x:1018:1018::/home/it17:/bin/bash it18:x:1019:1019::/home/it18:/bin/bash it19:x:1020:1020::/home/it19:/bin/bash it20:x:1021:1021::/home/it20:/bin/bash it21:x:1022:1022::/home/it21:/bin/bash it22:x:1023:1023::/home/it22:/bin/bash it23:x:1024:1024::/home/it23:/bin/bash it24:x:1025:1025::/home/it24:/bin/bash it25:x:1026:1026::/home/it25:/bin/bash it26:x:1027:1027::/home/it26:/bin/bash it27:x:1028:1028::/home/it27:/bin/bash it28:x:1029:1029::/home/it28:/bin/bash it29:x:1030:1030::/home/it29:/bin/bash it30:x:1031:1031::/home/it30:/bin/bash it31:x:1032:1032::/home/it31:/bin/bash it32:x:1033:1033::/home/it32:/bin/bash it33:x:1034:1034::/home/it33:/bin/bash it34:x:1035:1035::/home/it34:/bin/bash it35:x:1036:1036::/home/it35:/bin/bash it36:x:1037:1037::/home/it36:/bin/bash it37:x:1038:1038::/home/it37:/bin/bash it38:x:1039:1039::/home/it38:/bin/bash it39:x:1040:1040::/home/it39:/bin/bash it40:x:1041:1041::/home/it40:/bin/bash it41:x:1042:1042::/home/it41:/bin/bash it42:x:1043:1043::/home/it42:/bin/bash it43:x:1044:1044::/home/it43:/bin/bash it44:x:1045:1045::/home/it44:/bin/bash it45:x:1046:1046::/home/it45:/bin/bash it46:x:1047:1047::/home/it46:/bin/bash it47:x:1048:1048::/home/it47:/bin/bash it48:x:1049:1049::/home/it48:/bin/bash it49:x:1050:1050::/home/it49:/bin/bash it50:x:1051:1051::/home/it50:/bin/bash it51:x:1052:1052::/home/it51:/bin/bash it52:x:1053:1053::/home/it52:/bin/bash it53:x:1054:1054::/home/it53:/bin/bash it54:x:1055:1055::/home/it54:/bin/bash it55:x:1056:1056::/home/it55:/bin/bash it56:x:1057:1057::/home/it56:/bin/bash it57:x:1058:1058::/home/it57:/bin/bash it58:x:1059:1059::/home/it58:/bin/bash it59:x:1060:1060::/home/it59:/bin/bash it60:x:1061:1061::/home/it60:/bin/bash it61:x:1062:1062::/home/it61:/bin/bash it62:x:1063:1063::/home/it62:/bin/bash it63:x:1064:1064::/home/it63:/bin/bash it64:x:1065:1065::/home/it64:/bin/bash it65:x:1066:1066::/home/it65:/bin/bash it66:x:1067:1067::/home/it66:/bin/bash it67:x:1068:1068::/home/it67:/bin/bash it68:x:1069:1069::/home/it68:/bin/bash it69:x:1070:1070::/home/it69:/bin/bash it70:x:1071:1071::/home/it70:/bin/bash it71:x:1072:1072::/home/it71:/bin/bash it72:x:1073:1073::/home/it72:/bin/bash it73:x:1074:1074::/home/it73:/bin/bash it74:x:1075:1075::/home/it74:/bin/bash it75:x:1076:1076::/home/it75:/bin/bash it76:x:1077:1077::/home/it76:/bin/bash it77:x:1078:1078::/home/it77:/bin/bash it78:x:1079:1079::/home/it78:/bin/bash it79:x:1080:1080::/home/it79:/bin/bash it80:x:1081:1081::/home/it80:/bin/bash it81:x:1082:1082::/home/it81:/bin/bash it82:x:1083:1083::/home/it82:/bin/bash it83:x:1084:1084::/home/it83:/bin/bash it84:x:1085:1085::/home/it84:/bin/bash it85:x:1086:1086::/home/it85:/bin/bash it86:x:1087:1087::/home/it86:/bin/bash it87:x:1088:1088::/home/it87:/bin/bash it88:x:1089:1089::/home/it88:/bin/bash it89:x:1090:1090::/home/it89:/bin/bash it90:x:1091:1091::/home/it90:/bin/bash it91:x:1092:1092::/home/it91:/bin/bash it92:x:1093:1093::/home/it92:/bin/bash it93:x:1094:1094::/home/it93:/bin/bash it94:x:1095:1095::/home/it94:/bin/bash it95:x:1096:1096::/home/it95:/bin/bash it96:x:1097:1097::/home/it96:/bin/bash it97:x:1098:1098::/home/it97:/bin/bash it98:x:1099:1099::/home/it98:/bin/bash it99:x:1100:1100::/home/it99:/bin/bash it100:x:1101:1101::/home/it100:/bin/bash apache:x:48:48:Apache:/usr/share/httpd:/sbin/nologin oldboy01:x:1102:1103::/home/oldboy01:/bin/bash oldboy02:x:1103:1104::/home/oldboy02:/bin/bash oldboy03:x:1104:1105::/home/oldboy03:/bin/bash oldboy04:x:1105:1106::/home/oldboy04:/bin/bash oldboy05:x:1106:1107::/home/oldboy05:/bin/bash oldboy06:x:1107:1108::/home/oldboy06:/bin/bash oldboy07:x:1108:1109::/home/oldboy07:/bin/bash oldboy08:x:1109:1110::/home/oldboy08:/bin/bash oldboy09:x:1110:1111::/home/oldboy09:/bin/bash oldboy10:x:1111:1112::/home/oldboy10:/bin/bash [root@master ~]# awk /it01/ /etc/passwd [root@master ~]# awk ^C [root@master ~]# awk -F: '{print $1}' /etc/passwd root bin daemon adm lp sync shutdown halt mail operator games ftp nobody avahi-autoipd dbus polkitd tss postfix sshd wang systemd-network it101 it1 it2 it3 it4 it5 it6 it7 it8 it9 it10 it11 it12 it13 it14 it15 it16 it17 it18 it19 it20 it21 it22 it23 it24 it25 it26 it27 it28 it29 it30 it31 it32 it33 it34 it35 it36 it37 it38 it39 it40 it41 it42 it43 it44 it45 it46 it47 it48 it49 it50 it51 it52 it53 it54 it55 it56 it57 it58 it59 it60 it61 it62 it63 it64 it65 it66 it67 it68 it69 it70 it71 it72 it73 it74 it75 it76 it77 it78 it79 it80 it81 it82 it83 it84 it85 it86 it87 it88 it89 it90 it91 it92 it93 it94 it95 it96 it97 it98 it99 it100 apache oldboy01 oldboy02 oldboy03 oldboy04 oldboy05 oldboy06 oldboy07 oldboy08 oldboy09 oldboy10
6 权限 551代表啥 如何设置权限 ?
第一位代表属主有读(4)、执行(1)权限
第二位代表同组用户有读(4)、执行(1)权限
第三位代表其他用户只有执行(1)权限
chmod 551 文件名
7 权限 644代表啥 如何设置权限?
第一位代表属主有读 写权限
第二位代表同组用户有读权限
第三位代表其他用户有读权限
chmod 644 文件名
8 自己新建root.txt文件 给属主 为it 属租root 实战演示下
touch root.txt
chown it:root root.txt
9 面试题 谈谈系统开机流程说下
1 加电自检
检查硬件是否ok
2 MBR引导
引导系统启动读取磁盘记录
3grup菜单
选择启动内核
4加载内核信息
5系统的进程运行起来
systemd
6读取系统启动文件
/etc/systemd/system/default.target
[root@master ~]# cat /etc/systemd/system/default.target
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Multi-User System
Documentation=man:systemd.special(7)
Requires=basic.target
Conflicts=rescue.service rescue.target
After=basic.target rescue.service rescue.target
AllowIsolate=yes
7系统初始化文件
/usr/lib/systemd/system/sysinit.target
[root@master ~]# cat /usr/lib/systemd/system/sysinit.target
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=System Initialization
Documentation=man:systemd.special(7)
Conflicts=emergency.service emergency.target
Wants=local-fs.target swap.target
After=local-fs.target swap.target emergency.service emergency.target
8服务开机自动启动
/etc/systemd/system
9 运行一个mingetty进程
大致流程
硬件启动
引导阶段
内核系统
系统初始化文件
小结
awk核心功能
日志处理
数据过滤
数据统计
取列
语法:
awk 参数 动作 文件
sed 参数 条件 文件
= 赋值
== 等于
按照行号查询
需求1:取第二行
sed -n 2p awk
awk 'NR==2' awk
需求2:取1-3行信息
sed -n 1,3p awk
awk 'NR=1,NR=3' awk
第二种:按照字符查询
取出某个字符的数据
awk /Gege/ awk
[root@master ~]# awk /Gege/ awk
Zi Gege 1986787350 :250:168:200
第三种:取列信息
awk '{print $1}' awk
-F 分隔符
需求:只取出某个字符
awk -F: '{print $1}' awk
取姓名列 然后 取捐款金额
awk -F "[ :]+" '{print $1}' awk
[root@master ~]# cat awk
Zhang Dandan 41117397 :250:100:175
Zhang Xiaoyu 390320151 :155:90:201
Meng Feixue 80042789 :250:60:50
Wu Waiwai 70271111 :250:80:75
Liu Bingbing 41117483 :250:100:175
Wang Xiaoai 3515064655 :50:95:135
Zi Gege 1986787350 :250:168:200
Li Youjiu 918391635 :175:75:300
Lao Nanhai 918391635 :250:100:175
[root@master ~]# awk -F "[ :]+" '{print $3}' awk
Dandan
Xiaoyu
Feixue
Waiwai
Bingbing
Xiaoai
Gege
Youjiu
Nanhai
[root@master ~]# awk -F "[ :]+" '{print $3,$5}' awk
Dandan 250
Xiaoyu 155
Feixue 250
Waiwai 250
Bingbing 250
Xiaoai 50
Gege 250
Youjiu 175
Nanhai 250
命令注解
awk -F "[ :]+" '{print $3,$5}' awk
"[ :]+" 匹配一个或多个空格或冒号
笔试题
取出进程号和端口号: 写出命令
work 16067 /data/svr/redis/bin/redis-server*:6403
work 16067 /data/svr/redis/bin/redis-server*:6403
work 16067 /data/svr/redis/bin/redis-server*:6403
work 16067 /data/svr/redis/bin/redis-server*:6403
awk -F "[ :]+" '{print $2,$4}'
[root@master ~]# cat redis |awk -F "[ :]+" '{print $2,$4}'
16067 6403
16067 6403
16067 6403
16067 6403
查找所有包含'bash' 的行
awk '/bash/' /etc/passwd
[root@master ~]# awk '/bash/' /etc/passwd
root:x:0:0:root:/root:/bin/bash
wang:x:1000:1000:wang:/home/wang:/bin/bash
it101:x:1001:1001::/home/it101:/bin/bash
it1:x:1002:1002::/home/it1:/bin/bash
it2:x:1003:1003::/home/it2:/bin/bash
it3:x:1004:1004::/home/it3:/bin/bash
it4:x:1005:1005::/home/it4:/bin/bash
it5:x:1006:1006::/home/it5:/bin/bash
it6:x:1007:1007::/home/it6:/bin/bash
it7:x:1008:1008::/home/it7:/bin/bash
it8:x:1009:1009::/home/it8:/bin/bash
it9:x:1010:1010::/home/it9:/bin/bash
it10:x:1011:1011::/home/it10:/bin/bash
it11:x:1012:1012::/home/it11:/bin/bash
it12:x:1013:1013::/home/it12:/bin/bash
it13:x:1014:1014::/home/it13:/bin/bash
it14:x:1015:1015::/home/it14:/bin/bash
it15:x:1016:1016::/home/it15:/bin/bash
it16:x:1017:1017::/home/it16:/bin/bash
it17:x:1018:1018::/home/it17:/bin/bash
it18:x:1019:1019::/home/it18:/bin/bash
it19:x:1020:1020::/home/it19:/bin/bash
it20:x:1021:1021::/home/it20:/bin/bash
it21:x:1022:1022::/home/it21:/bin/bash
it22:x:1023:1023::/home/it22:/bin/bash
it23:x:1024:1024::/home/it23:/bin/bash
it24:x:1025:1025::/home/it24:/bin/bash
it25:x:1026:1026::/home/it25:/bin/bash
it26:x:1027:1027::/home/it26:/bin/bash
it27:x:1028:1028::/home/it27:/bin/bash
it28:x:1029:1029::/home/it28:/bin/bash
it29:x:1030:1030::/home/it29:/bin/bash
it30:x:1031:1031::/home/it30:/bin/bash
it31:x:1032:1032::/home/it31:/bin/bash
it32:x:1033:1033::/home/it32:/bin/bash
it33:x:1034:1034::/home/it33:/bin/bash
it34:x:1035:1035::/home/it34:/bin/bash
it35:x:1036:1036::/home/it35:/bin/bash
it36:x:1037:1037::/home/it36:/bin/bash
it37:x:1038:1038::/home/it37:/bin/bash
it38:x:1039:1039::/home/it38:/bin/bash
it39:x:1040:1040::/home/it39:/bin/bash
it40:x:1041:1041::/home/it40:/bin/bash
it41:x:1042:1042::/home/it41:/bin/bash
it42:x:1043:1043::/home/it42:/bin/bash
it43:x:1044:1044::/home/it43:/bin/bash
it44:x:1045:1045::/home/it44:/bin/bash
it45:x:1046:1046::/home/it45:/bin/bash
it46:x:1047:1047::/home/it46:/bin/bash
it47:x:1048:1048::/home/it47:/bin/bash
it48:x:1049:1049::/home/it48:/bin/bash
it49:x:1050:1050::/home/it49:/bin/bash
it50:x:1051:1051::/home/it50:/bin/bash
it51:x:1052:1052::/home/it51:/bin/bash
it52:x:1053:1053::/home/it52:/bin/bash
it53:x:1054:1054::/home/it53:/bin/bash
it54:x:1055:1055::/home/it54:/bin/bash
it55:x:1056:1056::/home/it55:/bin/bash
it56:x:1057:1057::/home/it56:/bin/bash
it57:x:1058:1058::/home/it57:/bin/bash
it58:x:1059:1059::/home/it58:/bin/bash
it59:x:1060:1060::/home/it59:/bin/bash
it60:x:1061:1061::/home/it60:/bin/bash
it61:x:1062:1062::/home/it61:/bin/bash
it62:x:1063:1063::/home/it62:/bin/bash
it63:x:1064:1064::/home/it63:/bin/bash
it64:x:1065:1065::/home/it64:/bin/bash
it65:x:1066:1066::/home/it65:/bin/bash
it66:x:1067:1067::/home/it66:/bin/bash
it67:x:1068:1068::/home/it67:/bin/bash
it68:x:1069:1069::/home/it68:/bin/bash
it69:x:1070:1070::/home/it69:/bin/bash
it70:x:1071:1071::/home/it70:/bin/bash
it71:x:1072:1072::/home/it71:/bin/bash
it72:x:1073:1073::/home/it72:/bin/bash
it73:x:1074:1074::/home/it73:/bin/bash
it74:x:1075:1075::/home/it74:/bin/bash
it75:x:1076:1076::/home/it75:/bin/bash
it76:x:1077:1077::/home/it76:/bin/bash
it77:x:1078:1078::/home/it77:/bin/bash
it78:x:1079:1079::/home/it78:/bin/bash
it79:x:1080:1080::/home/it79:/bin/bash
it80:x:1081:1081::/home/it80:/bin/bash
it81:x:1082:1082::/home/it81:/bin/bash
it82:x:1083:1083::/home/it82:/bin/bash
it83:x:1084:1084::/home/it83:/bin/bash
it84:x:1085:1085::/home/it84:/bin/bash
it85:x:1086:1086::/home/it85:/bin/bash
it86:x:1087:1087::/home/it86:/bin/bash
it87:x:1088:1088::/home/it87:/bin/bash
it88:x:1089:1089::/home/it88:/bin/bash
it89:x:1090:1090::/home/it89:/bin/bash
it90:x:1091:1091::/home/it90:/bin/bash
it91:x:1092:1092::/home/it91:/bin/bash
it92:x:1093:1093::/home/it92:/bin/bash
it93:x:1094:1094::/home/it93:/bin/bash
it94:x:1095:1095::/home/it94:/bin/bash
it95:x:1096:1096::/home/it95:/bin/bash
it96:x:1097:1097::/home/it96:/bin/bash
it97:x:1098:1098::/home/it97:/bin/bash
it98:x:1099:1099::/home/it98:/bin/bash
it99:x:1100:1100::/home/it99:/bin/bash
it100:x:1101:1101::/home/it100:/bin/bash
oldboy01:x:1102:1103::/home/oldboy01:/bin/bash
oldboy02:x:1103:1104::/home/oldboy02:/bin/bash
oldboy03:x:1104:1105::/home/oldboy03:/bin/bash
oldboy04:x:1105:1106::/home/oldboy04:/bin/bash
oldboy05:x:1106:1107::/home/oldboy05:/bin/bash
oldboy06:x:1107:1108::/home/oldboy06:/bin/bash
oldboy07:x:1108:1109::/home/oldboy07:/bin/bash
oldboy08:x:1109:1110::/home/oldboy08:/bin/bash
oldboy09:x:1110:1111::/home/oldboy09:/bin/bash
oldboy10:x:1111:1112::/home/oldboy10:/bin/bash
用 ':' 作为分隔符,查找第三段等于0的行
awk ’$3==0' awk
awk -F : '{print $3}' awk
[root@master ~]# awk -F : '{print $3}' awk
100
90
60
80
100
95
168
75
100
用':' 作为分隔符,查找第一段为‘root’的行,并把该段的‘root’换成‘toor’ 可以联合sed一起使用
awk -F: '$1=="root"' awk |sed s/root/toor/g
awk '$1=="root"' awk | sed s/root/toor/g
[root@master ~]# awk '$1=="root"' awk
root Xiaoai 3515064655 :50:95:135
root Youjiu 918391635 :175:75:300
[root@master ~]# awk '$1=="root"' awk |sed s/root/toor/g
toor Xiaoai 3515064655 :50:95:135
toor Youjiu 918391635 :175:75:300
用':' 作为分隔符,打印最后一段
[root@master ~]# awk -F ":" '{print $NF}' awk
175
201
50
75
175
135
200
300
175
用户管理部分
管理用户 root 权限很大
虚拟用户 nobody 管理进程
普通用户 it 权力有限
[root@master ~]# ll
total 13436
-rw-r--r-- 1 root root 0 Mar 11 03:04 10.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 11.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 12.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 13.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 14.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 15.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 16.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 17.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 18.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 19.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 1.log
-rw-r--r-- 1 root root 0 Mar 11 05:07 2
-rw-r--r-- 1 root root 0 Mar 11 03:04 20.log
-rw-r--r-- 1 root root 293 Mar 11 05:07 2.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 3.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 4.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 5.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 6.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 7.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 8.log
-rw-r--r-- 1 root root 0 Mar 11 03:04 9.log
-rw-r--r-- 1 root root 0 Mar 11 02:54 acclog.log
-rw-------. 1 root root 1318 Feb 29 23:58 anaconda-ks.cfg
-rw-r--r-- 1 root root 589 Mar 12 05:17 awk
-rw-r--r-- 1 root root 2006 Dec 1 2016 CentOS6-Base-163.repo
drwxr-xr-x 2 root root 6 Mar 11 02:40 data
-rw-r--r-- 1 root root 205 Mar 11 02:13 data-20240208.tar.gz
-rw-r--r-- 1 root root 205 Mar 11 02:16 data-20240209.tar.gz
-rw-r--r-- 1 root root 165 Mar 12 05:15 file
-rw-r--r-- 1 root root 0 Mar 8 05:11 hosts
-rw-r--r-- 1 root root 313 Mar 11 03:05 log.tar.gz
-rw-r--r-- 1 root root 128 Mar 9 20:48 motd
-rw-r--r-- 1 root root 2537 Mar 1 04:25 nwq1.6.sh
-rw-r--r-- 1 root root 0 Mar 9 20:51 profile
-rw-r--r-- 1 root root 224 Mar 12 04:50 redis
-rw-r--r-- 1 root root 11394981 Mar 11 02:20 services
-rw-r--r-- 1 root root 2312172 Mar 11 02:21 services.tar.gz
-rw-r--r-- 1 root root 339 Mar 11 02:37 test.tar.gz
lrwxrwxrwx 1 root root 14 Mar 10 00:30 test.txt -> /data/test.txt
r 读取 4
w 写入 2
x 执行 1