chdir("~class") does not work because ~class is a bash convention.
Try chdir("/home/class") or whatever is appropriate directory. (Note:
I haven't tried this, it is very late and I need some sleep.)
If the home directory varies depending on the machine, ask your
sysadmin why. As an alternative, try extracting it from the finger
output or getting the finger source and see how it does it. I don't
use NIS, so this may not work on your system.
HTH,
Jeffrey
Quoting jason
getcwd() isn't what i'm needing. I'll just describe what the program is.
The program will be used to students to handin homework assigments over the network. the program handin will be in ~user/bin, the conf files will be in ~user/handin/conf and the students assignments will be stored in ~user/handin/assign#/user_id. They will issue the command by typing "~coursenumber/bin/handin
<files>" so if you can see, the cwd will be the students dir and i need to change to the class dir. That is my problems since i kan't get from the students directory to the class directory. chdir( "~class") doesn't work and searching the passwd file for the classes home directory won't work since the computers use a NIS server.
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/