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

Explain the semantics of each field of ethernet frame, Give the format of E...

Give the format of Ethernet frame and explain the semantics of each field. An Ethernet frame starts with headers which have three fields. The 64-bit preamble, which precedes th

Shell script, shell script to find the factorial of a given number using th...

shell script to find the factorial of a given number using the for loop

Explain importance of modems used in data transfer, Explain importance of ...

Explain importance of modems used in data transfer and list some of the V-series recommendations. The series also describes a variety of DCEs using different type modulatio

If the system is not booting what can we do, First we must go to bios and s...

First we must go to bios and should check boot sequence,local add statusOr we should check RAM & check h.d.d cable. check cd writer for cd or dvd

Register transfer - computer architecture, Register transfer - computer arc...

Register transfer - computer architecture: Register transfer: The output and input gates for register Ri are controlled by the signals Riout and Riin respectively.

Use of arrays in assembly, An array is referencing using a base array value...

An array is referencing using a base array value as well as an index. To simplify addressing in arrays 8086 has provided two index registers for mathematical computations viz. BP a

Define apple mobileme calendar, Define Apple MobileMe Calendar The Mobi...

Define Apple MobileMe Calendar The MobileMe Calendar is a web-based calendar that can be accessed from any computer linked to the Internet, Mac or Windows. What makes it more u

Execution of a program in cpu, Execution of a program in CPU is completed e...

Execution of a program in CPU is completed employing different set of registers and their individual circuitry. As CPU registers are used for execution of interrupt service routine

State about the machine language programs, State about the machine language...

State about the machine language programs The computer can run only machine language programs, one needs to translate above programs to machine language programs. To translate

Select-options and parameters statement , The fields specified by select-op...

The fields specified by select-options and parameters statement cannot be grouped together in the selection screen. No, the fields specified by select-options and parameters s

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