Here is the client side output // Stashing multiple files [baasenie@zone17ec assignment4]$ ./client localhost 9090 Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :STASH a.c File Successfully stashed in memory. Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :STASH b.c File Successfully stashed in memory. Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :STASH dummy.txt File Successfully stashed in memory. Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :STASH client.c File Successfully stashed in memory. // Listing the files on the system Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :LIST 4 FILES IN THE SYSTEM [filename] [size] [views] [date stored] a.c 18 0 Wed Apr 14 22:43:48 2010 b.c 184 0 Wed Apr 14 22:43:50 2010 dummy.txt 0 0 Wed Apr 14 22:43:54 2010 client.c 3293 0 Wed Apr 14 22:43:58 2010 // Viewing files in the system Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :VIEW a.c this is stupid :p Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :VIEW b.c =========================== ___ _ / __|___ ___ __ _| |___ | (_ / _ \/ _ \/ _` | -_) \___\___/\___/\__, |_\___| |___/ =========================== // Listing again to show change in views Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :LIST 4 FILES IN THE SYSTEM [filename] [size] [views] [date stored] a.c 18 1 Wed Apr 14 22:43:48 2010 b.c 184 1 Wed Apr 14 22:43:50 2010 dummy.txt 0 0 Wed Apr 14 22:43:54 2010 client.c 3293 0 Wed Apr 14 22:43:58 2010 // Removing files and checking if they're still there after Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :REMOVE a.c File has been deleted successfully. Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :LIST 3 FILES IN THE SYSTEM [filename] [size] [views] [date stored] b.c 184 1 Wed Apr 14 22:43:50 2010 dummy.txt 0 0 Wed Apr 14 22:43:54 2010 client.c 3293 0 Wed Apr 14 22:43:58 2010 // re-inserting a previously deleted file Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :STASH a.c File Successfully stashed in memory. Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :LIST 4 FILES IN THE SYSTEM [filename] [size] [views] [date stored] b.c 184 1 Wed Apr 14 22:43:50 2010 dummy.txt 0 0 Wed Apr 14 22:43:54 2010 client.c 3293 0 Wed Apr 14 22:43:58 2010 a.c 18 0 Wed Apr 14 22:44:26 2010 // Removing a file that's not in the system Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :REMOVE client.txt File Not Found. // Exiting the client Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :DONE // When Exiting the client using DONE, the server and the files in it still runs // The Exit command kills both the client and the server [baasenie@zone17ec assignment4]$ ./client localhost 9091 Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :STASH a.c File Successfully stashed in memory. Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :LIST 1 FILES IN THE SYSTEM [filename] [size] [views] [date stored] a.c 18 0 Wed Apr 14 23:05:59 2010 Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :DONE [baasenie@zone17ec assignment4]$ ./client localhost 9091 Please enter one of the following the commands: STASH [stores a file into the RAM server] LIST [lists all files in the server] VIEW [shows the contents of the specified file] REMOVE [deletes the specified file from server] DONE [closes session but keeps the server running] EXIT [closes session and server] :LIST 1 FILES IN THE SYSTEM [filename] [size] [views] [date stored] a.c 18 0 Wed Apr 14 23:05:59 2010