Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question regarding the PATH environment variable

    I know if I put a (dot) before the PATH environment variable, it will be a really bad thing because if I have a script with called ls that does something malicious in a directory and I run it as root it can be very bad.

    But I have also heard that putting a (dot) after the PATH can also be just as bad. What is the reason for this and do you have an example?

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Harrow, UK
    I would never put a dot anywhere in my path because the dot represents the current directory. In Linux, you're encouraged to browse around your system examining things - you're not corralled in My Documents as you are in Windows - so the current directory at the time you enter a command could be just about any directory in the filesystem. You don't want such an indeterminate term in your command path.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts