Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a c + + 1 1 ?code ( that works in ubuntu ) . Simple Operating System Shell that can handle only some file

Write a c++11 ?code (that works in ubuntu).Simple Operating System Shell that can handle only some file operations. OS will have at most 10MB disk space. This OS space should be kept between the shell runs, it should not be deleted, it should remember the disk contents of the provious run. Write abase abstract class file. The class will have as many generic implementations are possible. There are three concrete file classes: directory, soft linked file and a regular file. Each file type provides an iterator that gives the file elements one by one. For regular files and the linked files, the entries are regular file bytes. For directories,the elements are directory entries.The commands, their parameters and definitions are given below. Make sure that your c++ ?code working.myShell

>1?

D. , ?Dec 2500:42

> ?mkdir myDir

>??

D. , ?Dec 25,00:42

D myDir , ?Dec 2500:44

> ?cd myDir

> ?ls

D. , ?Dec 2500:44

D.. , ?Dec 2500:42

>????? ?SomeFile.

> ?ls

D. , ?Dec 2500:44

D.. , ?Dec 2500:42

F SomeFile Dec 25 00:45 25345Bytes

The commands, their parameters and definitions are given below

image

myShell > 1s D. > mkdir myDir > 1s D D myDir > cd myDir > 1s > cp /etc/Some File . > 1s 1s mkdir D D F Some File Dec 25 00:45 rm Dec 25 00:42 Dec 25 00:42 The commands, their parameters and definitions are given below link Operation Parameters Explanation cd Dec 25 00:44 Dec 25 00:44 Dec 25 00:42 cat Dec 25 00:44 Dec 25 00:42 - R Directory name name file name Source file and destination file name Source file and destination file name 25345Bytes Path to the new current directory File name Lists the contents of the current directory R is for recursive listing Makes or removes a directory Deletes file in the current directory Copies the source file to the destination file Makes a soft link between the source file and the destination file Changes the current directory Types the file contents on the screen Notes Gives and error message if the directory cannot be removed The directories can be copied too. The source files can be in your regular OS file system. The destination is always the current directory. It behaves very much like In -s command of UNIX shell It behaves very much like cd command of UNIX shell. cd. and cd .. are valid See the text about iterators.

Step by Step Solution

3.46 Rating (159 Votes )

There are 3 Steps involved in it

Step: 1

To create a simple operating system shell that handles file operations and keeps track of disk contents between runs you can use the following C code as a starting point cpp include iostream include f... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elements Of Chemical Reaction Engineering

Authors: H. Fogler

6th Edition

013548622X, 978-0135486221

More Books

Students also viewed these Programming questions

Question

What are roll-over jigs, and what advantages do they offer?

Answered: 1 week ago

Question

explain the negativity bias;

Answered: 1 week ago

Question

Compare and contrast licensing and subcontracting.

Answered: 1 week ago