Change directory command, Computer Engineering

Assignment Help:

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.


Related Discussions:- Change directory command

How to insert script in dreamweaver, Q. How to insert script in dreamweaver...

Q. How to insert script in dreamweaver? Step 1: Click on Insert Step 2: Click on Script Step 3: Choose the type of Script Step 4: Write the code in "Content" Step 5: T

Describe thead, Q. Describe THEAD, TBODY and TFOOT tag? THEAD, TBODY, ...

Q. Describe THEAD, TBODY and TFOOT tag? THEAD, TBODY, TFOOT , , and form groups of rows. specifies that a group of rows are heade

How can we access the correction and transport system, How can we access th...

How can we access the correction and transport system? Each time you make a new object or change an existing object in the ABAP/4 Dictionary, you branch automatically to the W

Explain about interrupt-processing sequence, Q. Explain about Interrupt-Pro...

Q. Explain about Interrupt-Processing Sequence? The occurrence of an interrupt fires a numbers of events both in processor hardware and software. Figure below displays a sequen

Convert the following from octal to binary, Q. Convert the following from o...

Q. Convert the following from octal to binary, decimal, hexadecimal and BCD. a) 7.7 b) 4037 c) 23.34

Cutoff search - artificial intelligence, Cutoff Search : To require a ...

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

Loop level-parallelism based on granularity size, Loop Level This is...

Loop Level This is one more level of parallelism where iterative loop instructions can be parallelized. Fine Granularity  size is used at this level also. Simple loops in a

What controls the screen flow, What controls the screen flow? The SET ...

What controls the screen flow? The SET SCREEN and LEAVE SCREEN statements controls screen flow.

What are the general security issues, What are the General Security Issues ...

What are the General Security Issues Many issues exist when linking a computer system to the Internet or indeed to an external link via a network set up. There are numerous way

Explain that lost acknowledgement in packet retransmission, Explain that th...

Explain that the lost acknowledgement does not necessarily enforce retransmission of the packet . To guarantee reliable transfer, protocols utilize positive acknowledgement al

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd