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
Q. Describe _blank, _self, _parent and _top tags? These all are attributes of tag. The below example describes each of these attributes. <

In SDK – 86 kit 128KB SRAM and 64KB EPROM is provided on system and provision for expansion of another 128KB SRAM is given. The on system SRAM address starts from 00000H and that

Q. Define Master Construct in FORTAN? The master directive has following general form:  #pragma omp master structured_block  It causes master thread to execute structu

Q. Binary floating-point number range? Smallest Negative number   Maximum mantissa and maximum exponent     =    - (1 -2 -24 ) × 2 127   Largest negative number

What are the advantages of CMOS logic Ans: Advantages of CMOS Logic: (i) The power dissipation is mini-mum of all the logic families (ii) LSI and VLSI are possible

find cos(x) and sin(x) an pseudocode (while loop

Why is Cloud Computing important? There are many implication of cloud technology, for both developers and end users. For developers, cloud computing gives increased amounts of

Q. Using Library methods returns number of threads? #include void subdomain(float x[ ], int istart, int ipoints) { int i; for (i = 0; i x[istart+i] = 123.456;

When a database developer uses Hybrid OLAP it seperates the data among relational and specialized storage. In some certain modifications a HOLAP database may store vast amounts of

Determine the Object Design of Object oriented modelling Object Design:   At this phase, a design model is created based on the analysis model which is already created in the