git clone https://github.com/songquanpeng/filesystem-emulator.git
cd filesystem-emulator
cmake .
make
ubuntu@VM-0-16-ubuntu:/$ vim test.py 1
print("Hello World!")
:wq
ubuntu@VM-0-16-ubuntu:/$ ls
INode Name
1 test.py
ubuntu@VM-0-16-ubuntu:/$ cat test.py
print("Hello World!")
ubuntu@VM-0-16-ubuntu:/$ stat test.py
File: /test.py
Inode: 1
Size: 1024 B
Type: regular file
Create time: 1637464120
Block address: 1
ubuntu@VM-0-16-ubuntu:/$ df
Available space: 16124 KB
Total block number: 16126 Used block: 2 Block size: 1024 B
Inode number: 4096 Inode size: 64 B
- Implement a basic shell for interact.
- Able to create directory.
- Able to create file.
- Able to delete directory.
- Able to delete file.
- Able to list subdirs and files in target directory.
- Able to show file content.
- Able to edit file on creating.
- Able to show directory's attributes.
- Support relative path.
- Able to change working directory.
- Able to use all direct block addresses and indirect block address.
- Support "." and "..".
- When creating file, fill it with random string.
- When deleting directory, recursively delete all content in it.
- Able to copy file.
- Able to move file.