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
Problem: a) Most RMI and RPC systems expect to be supported by the "Request-Reply Protocol". Describe what "Request-Reply Protocol" is. b) Describe the invocation semantics

What is Locking? When two users at the same time attempt to access the similar data record, this is synchronized by a lock mechanism

By 2 pointers you can find it. One of them goes 2 nodes each time. The second one goes at 1 node each time. If there is a cycle, the one that goes 2 nodes every time will eventuall

Decision Trees - Artificial intelligence: Suppose you just ever do four things at the weekend: go shopping, watch a film, play tennis or just stay inside.  What you do depends

Question: a) Describe the structure and function of a computer system. b) The raw speed of a microprocessor will not achieve its potential unless a constant stream of wor

Explain Time Switching. Time Switches: The principle of a time switch is demonstrated in figure. This connects an incoming n channel PCM highway to an outgoing n channel PC

concurrentisation and vectorisation of program

Evaluation Functions for Cutoff Search - artificial intelligent Evaluation functions guess the score that may be guaranteed if a specific world state is reached. In chess, such

Q) a.Define the programming-language features that are required to properly  support concurrent programming? b. What support do these features need from the operating system?

What are the differences between user level threads and kernel supported threads? A thread, sometimes termed a lightweight process (LWP), is a fundamental unit of CPU utilizati