Change directory command, Computer Engineering

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.

Posted Date: 4/3/2013 2:56:25 AM | Location : United States







Related Discussions:- Change directory command, Assignment Help, Ask Question on Change directory command, Get Answer, Expert's Help, Change directory command Discussions

Write discussion on Change directory command
Your posts are moderated
Related Questions
Describe the various characteristics of UDP protocol. The characteristics of the UDP are as follows: End to end: UDP is transport protocols that can distinguish between

What  are  universal  gates.  Construct  a  logic  circuit  using  NAND  gates  only  for  the expression x = A . (B + C). Ans. Universal Gates: NAND and NOR Gates both are t

Explain the term step-wise refinement. Ans:  Step Wise Refinement  Refinement is a method of elaboration. Here one starts with a statement of function that is described a

Micro-instructions are stored in control memory. Address register for control memory comprises the address of subsequent instruction which is to be read. Control memory Buffer Regi

What are the two phases in the advancement of Linux? State some Applications of Open Source Systems? Finance Educational Data Storage and Management ERP (Ent

How many select lines will a 32:1 multiplexer will have ? Ans. 5 select lines will be required for 32 inputs, as 2 5 = 32.

Explain briefly the generic framework for e-commerce.  Generic framework of e-commerce contains the Applications of EC   (like as banking, shopping in online stores and malls,

Firewalls operate by Creening packets to/from the Network and give controllable filtering of network traffic.

Write short note on code optimization. Code optimization: It is the optional phase designed to enhance the intermediate code therefore the Ultimate object program runs quicke

Q. Explain working of Bit Serial Associative Processor? When associative processor accepts bit serial memory organization subsequently it is known as bit serial associative pr