type command in bash
By Gabriel Cooper •
I'm learning bash and while trying the "type" command with an argument like "cd" (type cd)which should return
cd is a shell builtinbut it throws no such file or directory.
What could be the problem?
11 Answer
It depends in which shell you are. type itself is a shell buitin, hence if the shell has no builtin called type and there is no executable in $PATH it will throw the error no such file or directory.
For example in csh, there is no type command. Use the which command instead:
user@host:~$ csh
# which cd
cd: shell built-in command.
# exit
user@host:~$ 1 More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"