How to find the absolute path of shell variable

Home Questions How to find the absolute path of shell variable

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by   2 years, 2 months ago.

  • Author
    Posts
  • #6668 Reply

    Thushara Muralidharan
    Participant
    Offline
    Topics: 12
    Replies: 10

    I am aware that every command having a script file which process the command and the file is located somewhere in the /bin folder. Instead of searching in all the folders, is there any easy way to get the absolute path of the shell command?

  • #6761 Reply

    admin
    Keymaster
    Online
    Topics: 65
    Replies: 65

    In Linux – Use where command to get the path.

    $ where cat
      /usr/bin/cat
    

    In Solaris – Use whence command to get the path.

    $ whence cat
      /bin/cat
    
Reply To: How to find the absolute path of shell variable

You can use BBCodes to format your content.
Your account can't use Advanced BBCodes, they will be stripped before saving.

Your information: