cd problem (Re: problem)

Molumuri Janardhan mjanar at corp.untd.com
Thu Apr 10 07:18:57 EDT 2003


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.

Thanks,
-janardhan.

-----Original Message-----
From: mlh at zip.com.au [mailto:mlh at zip.com.au]
Sent: Thursday, April 10, 2003 4:39 PM
To: Molumuri Janardhan
Cc: sudo-users at sudo.ws
Subject: cd problem (Re: problem)


On Thu, 10 Apr 2003 09:40:30 +0530
Molumuri Janardhan <mjanar at corp.untd.com> wrote:

> Why cd command with sudo is not working. Can you help me on these.

You should give more detail and tell us
what you want to do ... but I'll guess ... 
you're doing something like
   sudo cd


This will never "work" because the "current directory"
is something internal to a process.

Sudo does the cd, but when it's finished, your original
process is unchanged.

It should not be even possible to run "sudo cd"
but some posix standardisation genius decided that
all commands should be "exec"able, so there is a 
/bin/cd command which is perfectly useless under
some (most?) versions of commercial Unix.

Luckily the bsd's and linux's do not suffer this
monstrosity.


Regards,
Matt


More information about the sudo-users mailing list