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
how to find the type of cohesion in a module

Define memory management system? The part of the computer system that supervises the flow of information among auxiliary memory and main memory is known as memory management sy

Solve the equation 65.535 10 = X 16 Ans. In order to get X, convert the Decimal number 65.535 in its equal Hexadecimal form. So first taking 65 the integer part to convert in i

Q. In PRAM model steps required for executing an algorithm? Subsequent steps are performed by a PRAM model whenever executing an algorithm: i) Read phase: First the N proc

What are the advantages and disadvantages of packet switching over circuit switching? The comparison of packet switching and circuit switching demonstrating advantages and disa

Compiler is used to change the high-level language program into machine code at a time. It doesn't needs special instruction to store in a memory, it keeps automatically. The imple

Logic-based Expert Systems - Artificial intelligence: Expert systems are agents which are programmed to make decisions about real world situations. They are put together by uti

The linkage section is part of a known as program that 'links' or maps to data items in the calling program are working storage. It is the part of the called program where these sh

Cutoff Search : To require a mini and max search in a game on stage situation is, in which all we have is just do that programme our agent to look at the intact that search tr

Q. Show list files by Dir command? The Dir command can also be used to list files from the exacting directory. For example, the list of files present in the WORD directory in d