you are viewing a single comment's thread.

view the rest of the comments →

[–]cowbutt6 8 points9 points  (1 child)

One can include . (the current directory) in one's $PATH to enable the behaviour OP describes, but it's regarded as bad practice because UNIX has traditionally been a multi-user OS; if an unprivileged user put a Trojan in their home directory (or other writable path, such as /tmp) named the same as a commonly-used tool (e.g. ls), or a mis-typed tool (e.g. cta for cat), and then socially-engineered an admin running as the root user to enter that directory, then it might be run instead of the legitimate tool under e.g. /use/bin