Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <unistd.h>
- #include <stdio.h>
- int main() {
- char cwd[1024];
- chdir("/path/to/change/directory/to");
- getcwd(cwd, sizeof(cwd));
- printf("Current working dir: %s\n", cwd);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement