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
What are the various functional verification methodologies Ans: TLM (Transaction Level Modelling) Linting RTL Simulation (Environment  involving  :  stimulus  generators,

What is the LINQ file extension that interacts with Code Behinds objects? Ans) The extension of the file is .dbml

Q. Explain Physical Characteristics of magnetic disk? Figure below lists main features that differentiate among different types of magnetic disks. First head may either be fixe

Function of an IP Packet Screening Router: A screening router is the most basic type of firewall and uses only the packet filtering capability to control and monitor network tr

What is guard bits? Guard bits are extra bits which are produced while the intermediate steps to yield maximum accuracy in the final results.

Q. How to select a table? The easiest way to select a table in Standard view is by using tag selector, which displays HTML tags of elements in document. You will use tag sel

What is blocking probability? Blocking Probability: The blocking probability P is described as the probability like all the servers in system are busy. If all the servers ar

The customers visit the website and browse through the products, looking at pictures and products details. When the customer finds his desired product, he usually adds it to his ca

a. Explain the meaning of frame buffer? Draw a block diagram showing the method for scanning out an image from frame buffer to display surface. b. Explain the structure of plasm

The A/D converter whose conversion time is independent of the number of bits is ? Ans. Parallel conversion is the A/D converter whose conversion time is independent of the Numbe