Forrest logo
back to the whence tool

whence:tldr:94f9c

whence: Same as above, but show all occurrences on command path (equivalent to the `where` builtin).
$ whence -ca "${command}"
try on your machine

The command "whence -ca "${command}"" is a shell command used to search for the absolute path of a given command or program. Here is a breakdown of the command:

  • "whence" is a shell built-in command in some Unix-like operating systems, including various versions of Unix, Linux, and macOS. It is used to locate the source, alias, or path of a command or program.

  • "-c" is an option or flag for the "whence" command. This flag is used to display the command's source if it is a shell function or alias.

  • "-a" is another option for the "whence" command. This flag is used to display all occurrences of the command found in the user's PATH environment variable.

  • "${command}" is a placeholder that represents the name of the command or program you want to search for. You should replace "${command}" with the actual command name you want to find.

By running this command, the shell will search for the absolute path of the specified command and, if found, display its source (if it is a shell function or alias) and all occurrences of the command found in the user's PATH.

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