Forrest logo
back to the man tool

man:tldr:c9b99

man: Display the location of a manpage rather than the manpage itself.
$ man -w ${command}
try on your machine

The man -w command is used to locate the manual page files associated with a particular command in Unix-like operating systems. It is typically used to find the location where the manual (documentation) pages for a specific command are stored.

Here is the breakdown of the command:

  • man: It is the command used to display the manual (documentation) pages in Unix-like operating systems. It provides detailed information about various commands, functions, and system calls.

  • -w: It is an option used with the man command to tell it to only show the location of the manual page file(s) associated with the given command, without actually displaying the content of the manual page.

  • ${command}: It is a placeholder that represents the specific command for which you want to find the manual page files. You need to replace ${command} with the actual command name. For example, if you want to find the manual page(s) for the ls command, you would replace ${command} with ls, resulting in man -w ls.

When you run the man -w ${command} command, it searches for the manual page file(s) associated with the specified command and displays the path(s) to these files. This can be useful if you want to locate and access the manual page file(s) directly, or if you need the path information for any other purpose.

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 man tool