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
Q. Binary floating-point number range? Smallest Negative number   Maximum mantissa and maximum exponent     =    - (1 -2 -24 ) × 2 127   Largest negative number

Q. How do the registers help in instruction execution? We will discuss this in following steps: Step 1: First step of instruction execution is to fetch instruction which

Ethernet 10 Base 2 is an example of               network topology. (A)  Bus                                           (B)  Ring (C)  Star

Through two block diagrams explain the difference between Space division and time division switching. Space and Time Switching: Space Switches: Connections can be made i

Draw and elucidate the block diagram of programmable interrupt controller 8259. The 8259A adds 8 vectored priority encoded interrupts to microprocessor. It can be expanded to 6


State and prove Demorgan’s First theorems: Ans. Statement of First Theorem of De Morgan: = A‾. B‾   Proof: The two sides of the equation i.e. = is represented with logic

state function and path function

What are the Touch Panels In case of touch panels, displayed objects or screen positions is allowed to be selected with the touch of a finger. A typical application of touch pa

State the structure of Verilog code you follow? A good template for your Verilog file is shown below. // timescale directive tells the simulator the base units and precision