Re: [SLE] $PATH issue
- From: Sergey Mkrtchyan <crusoe@xxxxxxxxxx>
- Date: Tue, 07 Mar 2006 10:40:55 +0400
Randall R Schulz wrote:
On Sunday 05 March 2006 05:01, Jos van Kan wrote:Sergey Mkrtchyan wrote:People,Nothing is wrong: cd, ls, echo (and many others) are shell built ins
being a root, I do the following
linux:~ # export PATH=
Now as I understand it mustn't understand any command, because
there is nowhere for him to find for that commands, but he frelly
does ls, echo, and others, but don't do for example su, cfdisk...
Can you explain me what's wrong, and do I understand correctly the
meaning of the PATH?
and will always work, regardless of the value of $PATH. (man bash).
The "ls" command certainly is not built into BASH.
To discover whether a command is implemented as a built-in (some are
both built-ins and external commands), use the BASH "type" command (a
% help type
type: type [-afptP] name [name ...]
For each NAME, indicate how it would be interpreted if used as a
If the -t option is used, `type' outputs a single word which is one of
`alias', `keyword', `function', `builtin', `file' or `', if NAME is an
alias, shell reserved word, shell function, shell builtin, disk file,
or unfound, respectively.
If the -p flag is used, `type' either returns the name of the disk
file that would be executed, or nothing if `type -t NAME' would not
If the -a flag is used, `type' displays all of the places that contain
an executable named `file'. This includes aliases, builtins, and
functions, if and only if the -p flag is not also used.
The -f flag suppresses shell function lookup.
The -P flag forces a PATH search for each NAME, even if it is an alias,
builtin, or function, and returns the name of the disk file that would
% type help
help is a shell builtin
% type type
type is a shell builtin
% type cd
cd is a shell builtin
% type ls
ls is hashed (/bin/ls)
The type built-in will identify external commands, built-ins, aliases
and shell procedures.
Jos van Kan
Thanks Randall, thanks Jos
I learned much more new
Department of Molecular Physics,
Faculty of Physics, Yerevan State University
Tel: (374-10) 55-43-41
Fax: (374-10) 57-76-89
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-faq@xxxxxxxx
- Prev by Date: [SLE] Spamassassin
- Next by Date: Re: [SLE] Automount problems
- Previous by thread: Re: [SLE] $PATH issue
- Next by thread: [SLE] Tape drive drivers?