Change directory command, Computer Engineering

Assignment Help:

Your shell must accept a change directory command. This will be in the form: cd path  where cd is the change directory command and the path is what you will change the directory to. As you will be parsing all commands from the user, this should be broken into two char* elements. You can simply call chdir() from unistd.h and pass the path string. Be sure to check if the command worked properly. This can be done by checking the return value of the function. If the function results in an error, you must print an error message. Once again this can be done by calling perror(). Finally, regardless of if the command was successful or not, the prompt should be printed on a new line.


Related Discussions:- Change directory command

What can digital circuits do?, Circuits can be designed to implement a spec...

Circuits can be designed to implement a specifictaske.g. a simple circuit could compare two inputvoltages and give a high output if they matched anda low output if they did not mat

Simplify using k-map, Q. Simplify Using K-Map 1. M2 + M3 + M5 + M7 + M1...

Q. Simplify Using K-Map 1. M2 + M3 + M5 + M7 + M12 + M13 + M8 + M9 2. M0 + M2 + M4 + M5 + M8 + M10 + M12 3. F(W,X,Y,Z) = ∑ (0,1,2,4,5,6,8,9,12,13,14)

Example of pruning, Example of Pruning: As an example, we are assume t...

Example of Pruning: As an example, we are assume that the four choices for player one, there we are looking only two moves ahead 1 for player one and 1 for player two such as

Derive the expression of traffic capacity, Traffic Capacity is given by? ...

Traffic Capacity is given by? Traffic Capacity = Switching capacity × Theoretical maximum load.

What is an imperative statement, What is an imperative statement? Ans. ...

What is an imperative statement? Ans. Shows an action to be performed throughout execution of assembled program is an imperative statement.

Natural and artificial intelligence, Since the term artificial intelligen...

Since the term artificial intelligence was defined in the 1950s, experts have disagreed about the difference between natural and artificial intelligence. Can computers be pro

Address phase timing - computer architecture, Address phase timing: On...

Address phase timing: On the rising edge of clock 0, the initiator notes IRDY # and FRAME# both high, and GNT# low, so it drives the command, address and asserts FRAME# in tim

Example on plane, Q. If a plane is in the air also there is a fly flying in...

Q. If a plane is in the air also there is a fly flying inside the plane does the plane get heavier when the fly lands? Answer:- It is true that a fly puts weight on a plan

Define event marketing, Define Event Marketing. Web-based email marketi...

Define Event Marketing. Web-based email marketing enables the user to promote event through targeted email messages. Other applications help to make own event website (on cloud

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd