Forrest logo
back to the whence tool

whence:tldr:36813

whence: Display type of {{command}}, with location if defined as a function, or binary (equivalent to the `type` and `command -V` builtins).
$ whence -v "${command}"
try on your machine

The "whence" command is used to show the full path of a command in Unix-like operating systems. Specifically, the command "whence -v "${command}"" is a variation of the "whence" command that is designed to display the path and alias information of a specified command.

Let's break down the command:

  • "whence": This is the command itself.
  • "-v": It is an option or flag that stands for "verbose." When used with "whence," it provides additional information about the command, such as whether it is an alias or a built-in command.
  • "${command}": This is a variable that represents the command you want to find the path for. Depending on the context, it could be replaced with the name of a specific command, for example, "ls" or "grep."

By executing the command "whence -v "${command}"" with the appropriate command name, the terminal will display the full path to the command if it exists in the system. If the command is an alias, it will also show the original command that the alias refers to.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the whence tool