- Linux 32-bit support libraries, you can install them with:
sudo apt install gcc-multilib
- Compile (32-bit):
gcc -m32 linux_file_system_tree_sim.c
- Run it and enjoy:
./a.out
mkdir <pathname>
: create a new directory node in the file system tree;rmdir <pathname>
: remove an empty directory from the file system tree;cd [<pathname>]
: change the current working directory;ls [<pathname>]
: list the directory contents;pwd
: print the (absolute) path to the current working directory;create <pathname>
: create a new file node in the file system tree;rm <pathname>
: remove a file from the file system tree;save <filename>
: save the current file system tree as a text file (.txt);reload <filename>
: construct a file system tree from a well formatted text file;menu
: show the current help menu;prompt <prompt>
: change the command prompt text;quit
: save the file system tree as "file_system_tree.txt" and quit.
- Book: "System Programming in Unix/Linux" by K.C. Wang (2018)
- C naming conventions: https://users.ece.cmu.edu/~eno/coding/CCodingStandard.html#stacknames