sudo cd
or sudo cd ~username
The cd command does not work with sudo. Does anyone know why?
Thanks
It works fine; the "problem" is that "cd" is not a useful program
to execute via sudo (unless, perhaps, you want an implicit automount).
Point being: whatever it is that's being executed by sudo, when it's done
you're restored to where/what you were prior to issuing the sudo.
Note that the "cd" executed by sudo is not the shell's builtin cd, it's
[typically] the /bin/cd program (on Solaris 2.6).
Watch this:
sirius bash 20690/20692> pwd
/home/thad
sirius bash 20690/20692> which cd
/bin/cd
sirius bash 20690/20692> /bin/cd /tmp
sirius bash 20690/20692> pwd
/home/thad
sirius bash 20690/20692> cd /tmp
sirius bash 20690/20692> pwd
/tmp
Thad
Thad Floryan wrote in message <6us8n9$3tr$7...@nntp2.ba.best.com>...