Command not found error

I have a program called abc installed in /usr/local/bin.
My path is as follows:

# echo $PATH    
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin

However, when entering the abc command, the following error appears:

# abc
abc: Command not found

When entering the command with the full path, the program does start:

# /usr/local/bin/abc
abc> 

How do I make abc start from the command line without having to type in the full path?

First type:

which abc

Then you can change the order of your PATH to include the directory where "abc" is located before the location of the other "abc".

Thank you for your answer. In this particular case:

# which abc
/usr/local/bin/abc

Put in your script. do not export PATH=/sbin:/bin:..... directly.

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
export PATH

abc

Thank you for your response. Can you explain exactly what the code does and which part needs to be executed? Thank you in advance.

Sets PATH to /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin

All of it

Assuming that the "export" does not fix your problem, please check the output from:

alias
ls -lad /usr/local/bin/abc
file /usr/local/bin/abc

Ps: We have all assumed that you are using a modern Bourne-like Shell (e.g. bash) on a mainstream Operating System. If it is something unusual like BusyBox or "csh" please state your environment.

Thank you for your answers. I am using csh as the shell environment and have the following as the output:

# alias
h	(history 25)
j	(jobs -l)
la	(ls -a)
lf	(ls -FA)
ll	ls -lAG
# ls -lad /usr/local/bin/abc
-r-xr-xr-x  1 root  wheel  3463 May 19 19:40 /usr/local/bin/abc
# file /usr/local/bin/abc
/usr/local/bin/abc: a /usr/local/bin/perl  script text executable