/small_file_system

The OS homework

Primary LanguageC++

small file system

support features:

  1. set up file with command: set file_name
  2. read content of file with command: read file_name
  3. list total files with command: ls
  4. copy source file to destination file with command: cp source_file destinaation_file
  5. remove file with command: rm file_name

usage:

  1. set a.txt Type the content you want to save in a.txt. With twice Enter to finish the input.

  2. read a.txt Read the content of a.txt

  3. ls List the current total files

  4. cp a.txt b.txt Copy a.txt to a new file named b.txt

  5. rm a.txt remove the file of a.txt

compile

Linux

In current folder type in make, the main is the final proogram.

Windows

I didn't kow. Just have a try : )

exmple

![Screenshot from 2020-08-24 10-36-17](../../Pictures/Screenshot from 2020-08-24 10-36-17.png)

![Screenshot from 2020-08-24 10-37-13](../../Pictures/Screenshot from 2020-08-24 10-37-13.png)

![Screenshot from 2020-08-24 10-37-46](../../Pictures/Screenshot from 2020-08-24 10-37-46.png)

![Screenshot from 2020-08-24 10-38-15](../../Pictures/Screenshot from 2020-08-24 10-38-15.png)

![Screenshot from 2020-08-24 10-40-29](../../Pictures/Screenshot from 2020-08-24 10-40-29.png)

![Screenshot from 2020-08-24 10-41-08](../../Pictures/Screenshot from 2020-08-24 10-41-08.png)

set up a test file.

![Screenshot from 2020-08-24 10-42-35](../../Pictures/Screenshot from 2020-08-24 10-42-35.png)

remove test file.

![Screenshot from 2020-08-24 10-43-58](../../Pictures/Screenshot from 2020-08-24 10-43-58.png)