Visit Our UNIX and Linux User Community


Cd


 
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 05: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

Smilie
# 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...
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #501
Difficulty: Easy
If a piece of code adds two numbers together and stores the result, there should be a comment that explains the process in the source code.
True or False?

Featured Tech Videos