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
design a FULL adder with two half adders and an or gate

Introduction to object oriented Analysis & design: tools In case of OOAD, Unified Modelling Language (UML) is a well accepted language. It is used for constructing, visualizin

Explain the High Level Language? The programming language such as FORTRAN, C, or Pascal that enables a programmer to write programs those are more or less independent of a parti

Address translation: Compiler time : If it is known in advance that a program will reside at a particular location of primary memory, and then the compiler can be told to

There are two goals to AI; the major one is to produce an artificial system that is about as good as or good than a human being at dealing with the actual world. The second goal is

What are the advantages of Public Key Cryptography? Advantages of Public Key Cryptography are illustrated in below: a) Increased convenience and security and b) Electro

Implementing Protection with Virtual Memory - computer architecture: To enable the operating system to implement protection in the VM system, the HW have to: I. Support at

Http Hyper Text Transfer Protocol: The WWW protocol that performs the request and regain functions of a server. Generally seen as the first part of a website address. It is t

Dynamic partitioning: To rise above from difficulties with fixed partitioning, partitioning can be done dynamically, which called dynamic partitioning. Having it, the primary

How is a multidimensional array defined in terms of a pointer to a collection of contiguous arrays of lower dimensionality ? C does not have true multidimensional arrays. Howev