0

Hi Everyone,

I need help with my assignment but i only require assistance to give me some guidance on the issue.

I need to write code in c linux programming, that can change directory [CD]. when you open the command prompt in the linux machine, you type cd .. or something then it will change the current working directory. Can i ask how do i do that in c programming?

Thank you for reading my post. Please let me know if my question isn't clear.

2
Contributors
2
Replies
18
Views
3 Years
Discussion Span
Last Post by strRusty_gal
2
int chdir(const char *path);

You can use chdir() which is in the unistd.h header file.

Edited by gerard4143

Votes + Comments
Thanks!~
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.