1. 使用cat命令查看文件内容。(test用户下操作,文件存不存在?不存在的话需要新建文件,并且设置内容)
[test@localhost ~]$ mkdir dir1
[test@localhost ~]$ ll
total 0
drwxr-xr-x. 2 test test 6 Mar 12 01:03 Desktop
drwxrwxr-x. 2 test test 6 Mar 25 18:43 dir1
drwxr-xr-x. 2 test test 6 Mar 12 01:03 Documents
drwxr-xr-x. 2 test test 6 Mar 12 01:03 Downloads
-rw-rw-r--. 1 test test 0 Mar 25 18:04 hello.txt
drwxrwxr-x. 2 test test 6 Mar 25 18:04 m
drwxr-xr-x. 2 test test 6 Mar 12 01:03 Music
drwxr-xr-x. 2 test test 6 Mar 12 01:03 Pictures
drwxr-xr-x. 2 test test 6 Mar 12 01:03 Public
drwxr-xr-x. 2 test test 6 Mar 12 01:03 Templates
drwxrwxr-x. 3 test test 15 Mar 25 18:05 tmp
drwxr-xr-x. 2 test test 6 Mar 12 01:03 Videos
[test@localhost ~]$ cd dir1
[test@localhost dir1]$ ll
total 4
-rw-r--r--. 1 test test 20 Mar 25 18:43 file1
[test@localhost dir1]$ cat file1
welcome
abc
def
ghi