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

Researching strategy - artificial intelligence, Researching strategy - arti...

Researching strategy - artificial intelligence: If our search and researching strategy and swot of it is surety to find all types of hints such the solutions eventually, then

What are the categories of radio communication, What are the categories of ...

What are the categories of Radio communication 1.  Sky wave or ionosphere communication 2.  Line-of-sight (LOS) microwave communication limited by horizon 3.  Troposphere

Determine in detail about the vhdl, Determine in detail about the VHDL ...

Determine in detail about the VHDL Multiple design-units (entity/architecture pairs), which reside in the same system file, may be separately compiled if so desired. Though, it

What is random access memory, Q. What is Random Access Memory? We will ...

Q. What is Random Access Memory? We will discuss RAM as an example of sequential circuit. A memory unit is a collection of storage cells or flip flops along with associated cir

What does a socket having of, The combination of an IP address and a port n...

The combination of an IP address and a port number is known as a socket.

Describe types of complements, Q. Describe types of complements? There ...

Q. Describe types of complements? There are two kinds of complements for a number of base (also known as radix) r. These are known as r's complement and (r- 1)'s complement. Fo

What is jmx, JMX is native to the Java programming language. As a result, i...

JMX is native to the Java programming language. As a result, it offers natural, efficient, and lightweight management extensions to Java-based functions. It has of a set of specifi

Simple assembly programs, Data Transfer Two most fundamental data trans...

Data Transfer Two most fundamental data transfer instructions in 8086 microprocessor are XCHG and MOV. Let's give illustrations of the use of these instructions. Program 1:

Explain telnet, Explain Telnet Telnet is a Remote Login.

Explain Telnet Telnet is a Remote Login.

Determine the output of T-flipflops in cascade, If  the input to T-flipflop...

If  the input to T-flipflop is 100 Hz signal, the final output of the three T-flipflops in cascade is ? Ans. The  final  output  of  the  three  T-flip-flops in cascade is 12.5 H

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