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
Explain Deadlock in operating system ? Deadlock: all process in a set of processes is waiting for an event which only a process in the set can cause.

can i get the comparison of microprocessors architecture?

how to write mobile keypad program in c++

Differentiate between Hardware and Software Another classification is software vs. hardware. Hardware is the collection of physical components, like chips, wires, PCBs, connect

a. Write down the salient difference among conventional T.V. and High Definition TV (HDTV) and also highlight the various benefits of digital representation for video. b. Video

How can system improved if one arrive at the probability of availability of free lines during the busy hour? Improvement can be made when the system is act as a loss system in

In a RAM, information can be stored ? Ans. RAM is used by the user, number of times.

In 1960: The purpose of e-commerce was to exchange the electronic data. In 1970s: Electronic Fund Transfers or EFT was developed which considered as huge impact in the emerging

What is the use and function of File Transfer Protocol? FTP : File Transfer Protocol (FTP) is the protocol used upon the Internet for sending files and is usually used fo

Pass I of the assembler must also generate the intermediate code for the processed statements. Justify your answer. Criteria for selection of a suitable intermediate code form