Reputation: 2481
i know to check in the current directory opendir(dir_name)
, but i need to check that in some other path , not in the CWD(current working directory)
,
or is there any function is to move the CWD to some other directory while executing
Upvotes: 0
Views: 48
Reputation: 15121
You could use opendir(abs_path/dir_name)
to open a directory dir_name
under absolute path abs_path
.
You also could use chdir()
to change your cwd to other directory.
Upvotes: 2
Reputation: 384
Yes the daemon process change their directory to root while executing. The function to change the working directory while executing is chdir(PATH_TO_SET_AS_CWD).
Upvotes: 1