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
Add +25 to -15 by using 2's complement ? Ans. Firstly convert the numbers 25 and 15 in its 8-bit binary equivalent and determine the 2's complement of 15, after that add +25 to -

What types of calendars can you create with Google Calendar? Personal calendars, like default calendar Public calendars, which others can access through the web

Draw a circuit of TTL gates with Wired-AND connection and explain its operation. Wired - AND Connection In digital IC's NAND and NOR gates are most frequently used. For th

Hubs are present in the network To interconnect the LAN with WANs.

Need to build a 4bit JK flip flop counter with a unique patter. 6 4 2 5 3 1 F C B A

What are the concerns for growth of e-commerce in India? Government as Facilitator for the growth of e-commerce has taken following steps: a. Promotion of competitive dataco

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Explain difference between macro call and macro expansion. Macro expansion: While a macro name is used along with a set of actual parameters this is replaced through a code g

A useful exercise in understanding assembly language and its relation to machine language is to take a short assembly language program and translate it to machine language by hand.

What is Page-Stealer process? This is the Kernel process that makes rooms for the incoming pages, by swapping the memory pages that are not the part of the working set of a pro