1)创立文件目录/test,并在此文件目录新建pig.txt文件,文件内容为 “Hello pig! ” ,查看pig.txt内容,然后再查看/test文件目录下的所有文件的inode编号及详细信息。
时间: 2024-11-03 12:19:59 浏览: 8
TXT_test.rar_test.txt文_监控文件夹_监控文件夹下的文件生成
```
$ mkdir test
$ touch test/pig.txt
$ echo "Hello pig!" > test/pig.txt
$ cat test/pig.txt
Hello pig!
$ ls -li test
total 4
4096 drwxr-xr-x 2 user user 4096 Dec 15 18:00 test
1024 -rw-r--r-- 1 user user 17 Dec 15 18:00 pig.txt
$ stat test/*
test (directory):
File: test/
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 805h/2053d Inode: 28833185 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 1000/user) Gid: ( 1000/user)
Access: 2022-12-15 18:00:00.000000000 +0800
Modify: 2022-12-15 18:00:00.000000000 +0800
Change: 2022-12-15 18:00:00.000000000 +0800
Birth: -
test/pig.txt:
File: test/pig.txt
Size: 17 Blocks: 1 IO Block: 4096 regular file
Device: 805h/2053d Inode: 28833187 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/user) Gid: ( 1000/user)
Access: 2022-12-15 18:00:00.000000000 +0800
Modify: 2022-12-15 18:00:00.000000000 +0800
Change: 2022-12-15 18:00:00.000000000 +0800
Birth: 2022-12-15 18:00:00.000000000 +0800
```
阅读全文