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

Characteristics of large register file, Characteristics of large-register-f...

Characteristics of large-register-file and cache organizations Large Register File Cache Hold local variables for almost all functio

Hard-disk acquisition, Problem (a) Forensic methodology consists of t...

Problem (a) Forensic methodology consists of three phases. Briefly explian these three phases. (b) Sometimes it's best not to perform hard-disk acquisition. Provide two

What is reflection, What is Reflection?  It extends the benefits of met...

What is Reflection?  It extends the benefits of metadata by permitting developers to inspect and use it at runtime. For example, dynamically verify all the classes contained in

What is fan-out, What is fan-out? Estimate the average count of every "...

What is fan-out? Estimate the average count of every "many" association encountered with the path. Multiply the individual fan-outs who obtain the fan-out of the whole path, wh

Example on sorting using combinational circuit, Q. Example on Sorting using...

Q. Example on Sorting using Combinational Circuit? Example: Think about a unsorted list having element values like given below {3,9,8,5,10,12,14,20,90,95,60,40,23,35,18,0}

Manipulating logical expressions, Digital circuits also manipulate logicale...

Digital circuits also manipulate logicalexpressione.g. IF account is in credit THEN allow phoneto make calls.So a digital circuit must determine if somethingis TRUE or FALSE. Norma

Largest and the second largest number, The largest and the second largest n...

The largest and the second largest number from a set of n distinct numbers can be found in    O (n)

Simplified boolean expression, Simplified the Boolean Algebra (x + y)(x + z...

Simplified the Boolean Algebra (x + y)(x + z) simplifies to ? Ans. x + yz as simplified the Boolean Algebra expression. [(x + y) (x + z)] = xx + xz + xy + yz = x + xz + xy + y

What is computer communications networks, Q. What is Computer communication...

Q. What is Computer communications networks? Computer communications networks are the outcome of a combination of computers and telecommunication products. An interconnected gr

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