Question: To write a program in C that simulates a UNIX-based file-system, and using a tree structure (except slightly modified using a linked list sort of

To write a program in C that simulates a UNIX-based file-system, and using a tree structure (except slightly modified using a linked list sort of data structure to indicate files in a directory), what would be the best way to go about this? It is a tree; but instead of having left and right child, it is setup to initially be the username as the first directory then the root (protected nodes, e.g. it would be initialized joeschmoe/root/). We want to be able to manipulate any files and directories created, deleted, or (hard link) duplicated. So the struct would look like a root node (actually username node) then pointing to root (protected), and then allow the user to create directories and files as necessary (simulated, not actual files and directories). The directories (alphabetized) can be empty or contain files (alphabatized) in a linked list kind of fasion, but using a tree structure. What is (in whoever answers this) the best data structures and file organization methods to be able to do this and take commands like a terminal would in UNIX?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!