/linux-file-system-simulation

A C program to simulate the Unix/Linux file system tree.

Primary LanguageC

linux-file-system-simulation

A simulation for linux file system with the following commands

  • mkdir pathname : make a new directory for a given pathname

  • rmdir pathname : remove the directory, if it is empty.

  • cd [pathname] : change the current working directory to pathname, or to / if no pathname.

  • ls [pathname] : list the directory contents of pathname or the current working directory

  • pwd : print the (absolute) pathname of the current working directory.

  • touch pathname : make a new file for a given pathname.

  • rm pathname : remove the file.

  • save filename : save the current file system tree as a file.

  • reload filename : construct a file system tree from a file.

  • menu : show a menu of valid commands.

  • quit : terminate the program.

    Note: You can use sysTree to construct a file system tree.