cd problem (Re: problem)
Todd C. Miller
Todd.Miller at courtesan.com
Thu Apr 10 11:33:06 EDT 2003
In message <A74DA636A939D7118E4B00065B8E55B0077A57 at hydmail2.hyd.office.juno.com
so spake Molumuri Janardhan (mjanar):
> My problem is
> I have directory
> drwxr-x--- 3 root sys 512 Feb 8 06:11 cron.d
> I couldn't able to "sudo cd cron.d" won't work.
Nor should it. From the sudo TROUBLESHOOTING file:
Q) When I try to use "cd" with sudo it says "cd: command not found".
A) "cd" is a shell builtin, you can't run it as a command since
a child process (sudo) cannot affect the current working directory
of the parent (your shell).
Q) When I try to use "cd" with sudo the command completes without
errors but nothing happens.
A) Some SVR4-derived OS's include a /usr/bin/cd command for reasons
unfathomable. A "cd" command is totally useless since a child process
cannot affect the current working directory of the parent (your shell).
More information about the sudo-users