Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Cd
# 1  
Old 10-02-2001
Error Cd

why is 'cd' a shell built in and not an executable?

Last edited by clickonline1; 10-02-2001 at 04:31 PM..
# 2  
Old 10-02-2001
It IS and executable - /usr/bin/cd

Why did you think it was a shell built-in?
# 3  
Old 10-02-2001
cd doesnt exist in the bin

It doesnt exist in the bin....

Unix gives a message....

"cd is a shell built in"
# 4  
Old 10-02-2001
What exactly gives you that message?
What flavor/version of UNIX?
Are you looking in /usr/bin ?
What shell are you using?

What does "man cd" say?
What does "which cd" say?
What does "whereis cd" say?
What does "find / -name cd -print" say?
# 5  
Old 10-02-2001
Red Hat Linux 7.1

I used the command:

type -all cd

# 6  
Old 10-02-2001
What answers do you have for the other 6 questions?
# 7  
Old 10-03-2001
In many modern shells (bash, ksh), cd is actually a builtin. I believe that the reason for this, is that it executed much faster that calling an outside application for such a simple command. Some systems may have the binary available, although I'm not sure if that's for backwards-compatibility or not...
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question