How do I know if the man page I'm looking at is the correct one?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
2
down vote

favorite
1












For example,



[fakename]$ type echo
echo is a shell builtin


But man echo gives me the GNU coreutils version of echo. What's the easiest way to tell if the man page I'm looking at is the correct one, i.e the one for the utility I'd get if I directly invoked it?







share|improve this question



























    up vote
    2
    down vote

    favorite
    1












    For example,



    [fakename]$ type echo
    echo is a shell builtin


    But man echo gives me the GNU coreutils version of echo. What's the easiest way to tell if the man page I'm looking at is the correct one, i.e the one for the utility I'd get if I directly invoked it?







    share|improve this question























      up vote
      2
      down vote

      favorite
      1









      up vote
      2
      down vote

      favorite
      1






      1





      For example,



      [fakename]$ type echo
      echo is a shell builtin


      But man echo gives me the GNU coreutils version of echo. What's the easiest way to tell if the man page I'm looking at is the correct one, i.e the one for the utility I'd get if I directly invoked it?







      share|improve this question













      For example,



      [fakename]$ type echo
      echo is a shell builtin


      But man echo gives me the GNU coreutils version of echo. What's the easiest way to tell if the man page I'm looking at is the correct one, i.e the one for the utility I'd get if I directly invoked it?









      share|improve this question












      share|improve this question




      share|improve this question








      edited yesterday









      Kusalananda

      100k13199311




      100k13199311









      asked 2 days ago









      extremeaxe5

      1875




      1875




















          6 Answers
          6






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          You don't, really. Not without knowledge external to the man page.



          In the case of echo (and printf, and test, ...), it's often a shell builtin, so you'll need to know that and read the shell's documentation.
          (And echo is notoriously different in different implementations, use printf instead.)



          In most, if not all shells, you can find if something is a builtin with type command, e.g. type echo will print echo is a shell builtin. (type is specified by POSIX but e.g. fish supports it too, as non-POSIXy as it is.) In Bash, you'd then read man bash, the online documentation, or use the builtin command help (which is specific to Bash, and which you need to know exists).



          Even if the command is not a builtin, it's possible that there are several commands with the same name, rename being a famous example (see Why is the rename utility on Debian/Ubuntu different than the one on other distributions, like CentOS?). Now, your OS should have the correct man page for the actually installed utility, and e.g. in Debian, the "alternatives" system updates the corresponding man pages also when the command alternatives are changed. But if you read an online man page, you'll need to be aware of it.



          Many utilities have a command line option like --version which might tell you what implementation that command is. (But not nearly all utilities have it. I think it's a GNUism originally, so GNU utilities have it, as well as those that happened to copy the custom.) In the case of rename, it happens to work in telling two different implementations apart:



          debian$ rename --version
          /usr/bin/rename using File::Rename version 0.20
          centos$ rename --version
          rename (util-linux-ng 2.17.2)


          Besides that, your system might have an alias or a function with the same name of a utility, usually to modify the behaviour of the utility. In that case, the defaults presented in a man page might not apply. Aliases for ls are common, as are aliases adding -i to rm or mv. But type foo would also tell you if foo is an alias or function.






          share|improve this answer























          • The shell built-in commands doesn't support the --version option.
            – GAD3R
            yesterday







          • 1




            @GAD3R, yeah, and neither do the standard utilities on BSDs, or many other tools. For shell builtins, it's of course not necessary, since it's the shell's version that applies, so just go check $BASH_VERSION in case of Bash... And for other utilities, you need to know if they support that option, which you'd find from the man page, leading us back to the original question. :D
            – ilkkachu
            yesterday

















          up vote
          1
          down vote













          If you want the manual for a built-in command, then you need to look at the manual of your shell. The command will be documented therein, along with all other built-in commands (or there will at least be a reference to where the documentation for builtins is to be found).




          • bash: man bash or help echo from an interactive bash shell.


          • zsh: man zsh (and after a bit of reading, man zshbuiltin)


          • fish: man fish (and after a bit of reading, help echo)

          The manual that you get for man echo documents /bin/echo, i.e. the external echo command. This command is not what you would use when you use echo without an explicit path.






          share|improve this answer























          • As mentioned in my answer, on a user friendly UNIX, you get the documentation for all test versions if you type man test.
            – schily
            yesterday






          • 1




            @schily I'd rather run my unfriendly Unix where I get specific info about exactly what I ask for :-)
            – Kusalananda
            yesterday










          • You do not seem to like useful answers :-( If you did have a look at the sample man page, you did write a more useful answer,
            – schily
            yesterday

















          up vote
          0
          down vote













          It should be possible to invoke the non-shell-internal version by giving the full path (which you could get with which echo). There are not separate manpages for shell internals; for documentation on those you'll want to look for the manpage for your shell. The "type" command you mention above is the best way to figure out which you'll get.






          share|improve this answer

















          • 1




            My question was how to tell whether the man page is correct. Perhaps the example was misleading; I am speaking more so of two commands that have the same name (different versions of ps or something), and how to tell whether the info I’m getting from the man page is accurate.
            – extremeaxe5
            2 days ago

















          up vote
          -1
          down vote













          Since the command you want to get information on is a shell built-in, typing help <command name> in the same shell will give you the correct help entry:



          $ help echo
          echo: echo [-neE] [arg ...]
          Write arguments to the standard output.
          ...


          Alternatively, you can type man bash(or whatever shell you are using) and find the builtin you were looking for.



          Unfortunately, there is no easy way to verify that a man page fully matches the command you want to run. Getting the "right" page is trickier than it seems, as that will depend on many factors such as the command's full path, environment variables and aliases, and it's technically impossible for man do account for all such factors. However, after a short while you should develop general understanding of where to look for help.



          If I were to describe a general algorithm of getting the right documentation on most modern *nices, it would look something like this:



          • Do you need help with a built-in (type <command> says it's built-in)?

            • Use help <command> or man <shellname> if help is unavailable in your shell.


          • Do you want your help succinct and technical?

            • Use man <command> (or man <section> <command> if there are multiple entries in different sections, see man man for the list of sections)


          • Do you want your help in the form of a lengthier interactive tutorial/manual (if available)?

            • use info <command>


          • If the above steps fail:

            • Check /usr/share/doc/<package name> for additional documentation on the package, such as HTML pages.

            • Run the command with the -h or --help options, assuming the command is to be trusted. That will oftentimes give a brief summary of what it does and tell you where you can find more information.

            • Google.


          but I must reiterate, this all will become "natural" as one spends some time with the OS.






          share|improve this answer



















          • 1




            Only if the current shell happens to be bash.
            – Kusalananda
            yesterday










          • Correct, on a typical UNIX, you get ERROR: Key 'echo' not found (he1) since help is a command from the SCCS suite.
            – schily
            yesterday










          • @Kusalananda based on OP's tag history I highly suspect the shell in question is bash, but fair enough! I would encourage using help if it's available, however, since it is the most straightforward way of getting help with any builtins your shell has.
            – undercat
            yesterday







          • 1




            On OpenBSD, which does not use bash by default, help is a synonym for man, which would give the wrong version of the manual when used as help echo.
            – Kusalananda
            yesterday

















          up vote
          -3
          down vote













          man is split in section:



          1. General Section

          2. System Calls

          3. Library Functions

          4. File Formats

          5. Games and screensavers

          6. Miscellaneous

          7. System administration

          Depending on what you are looking for you can invoke man like that to avoid confusion: man section command.



          For more information you can actually use man man






          share|improve this answer




























            up vote
            -3
            down vote













            If your OS distro does not have man pages for those programs that mention the differences, you should make bug report.



            In fact, this is the task of the distro creators, but if you type:



            type cmdname


            you will get output whether cmdname is a shell builtin. If you know what shell you are using, you could run:



            man shellname


            replacing shellname with the name ouf your shell. The man page of your shell should contain information about builtin commands.



            Let me give an example on how a user friendly UNIX should document this: http://schillix.sourceforge.net/man/man1/test.1.html






            share|improve this answer























              Your Answer







              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "106"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: false,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );








               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460567%2fhow-do-i-know-if-the-man-page-im-looking-at-is-the-correct-one%23new-answer', 'question_page');

              );

              Post as a guest






























              6 Answers
              6






              active

              oldest

              votes








              6 Answers
              6






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              4
              down vote



              accepted










              You don't, really. Not without knowledge external to the man page.



              In the case of echo (and printf, and test, ...), it's often a shell builtin, so you'll need to know that and read the shell's documentation.
              (And echo is notoriously different in different implementations, use printf instead.)



              In most, if not all shells, you can find if something is a builtin with type command, e.g. type echo will print echo is a shell builtin. (type is specified by POSIX but e.g. fish supports it too, as non-POSIXy as it is.) In Bash, you'd then read man bash, the online documentation, or use the builtin command help (which is specific to Bash, and which you need to know exists).



              Even if the command is not a builtin, it's possible that there are several commands with the same name, rename being a famous example (see Why is the rename utility on Debian/Ubuntu different than the one on other distributions, like CentOS?). Now, your OS should have the correct man page for the actually installed utility, and e.g. in Debian, the "alternatives" system updates the corresponding man pages also when the command alternatives are changed. But if you read an online man page, you'll need to be aware of it.



              Many utilities have a command line option like --version which might tell you what implementation that command is. (But not nearly all utilities have it. I think it's a GNUism originally, so GNU utilities have it, as well as those that happened to copy the custom.) In the case of rename, it happens to work in telling two different implementations apart:



              debian$ rename --version
              /usr/bin/rename using File::Rename version 0.20
              centos$ rename --version
              rename (util-linux-ng 2.17.2)


              Besides that, your system might have an alias or a function with the same name of a utility, usually to modify the behaviour of the utility. In that case, the defaults presented in a man page might not apply. Aliases for ls are common, as are aliases adding -i to rm or mv. But type foo would also tell you if foo is an alias or function.






              share|improve this answer























              • The shell built-in commands doesn't support the --version option.
                – GAD3R
                yesterday







              • 1




                @GAD3R, yeah, and neither do the standard utilities on BSDs, or many other tools. For shell builtins, it's of course not necessary, since it's the shell's version that applies, so just go check $BASH_VERSION in case of Bash... And for other utilities, you need to know if they support that option, which you'd find from the man page, leading us back to the original question. :D
                – ilkkachu
                yesterday














              up vote
              4
              down vote



              accepted










              You don't, really. Not without knowledge external to the man page.



              In the case of echo (and printf, and test, ...), it's often a shell builtin, so you'll need to know that and read the shell's documentation.
              (And echo is notoriously different in different implementations, use printf instead.)



              In most, if not all shells, you can find if something is a builtin with type command, e.g. type echo will print echo is a shell builtin. (type is specified by POSIX but e.g. fish supports it too, as non-POSIXy as it is.) In Bash, you'd then read man bash, the online documentation, or use the builtin command help (which is specific to Bash, and which you need to know exists).



              Even if the command is not a builtin, it's possible that there are several commands with the same name, rename being a famous example (see Why is the rename utility on Debian/Ubuntu different than the one on other distributions, like CentOS?). Now, your OS should have the correct man page for the actually installed utility, and e.g. in Debian, the "alternatives" system updates the corresponding man pages also when the command alternatives are changed. But if you read an online man page, you'll need to be aware of it.



              Many utilities have a command line option like --version which might tell you what implementation that command is. (But not nearly all utilities have it. I think it's a GNUism originally, so GNU utilities have it, as well as those that happened to copy the custom.) In the case of rename, it happens to work in telling two different implementations apart:



              debian$ rename --version
              /usr/bin/rename using File::Rename version 0.20
              centos$ rename --version
              rename (util-linux-ng 2.17.2)


              Besides that, your system might have an alias or a function with the same name of a utility, usually to modify the behaviour of the utility. In that case, the defaults presented in a man page might not apply. Aliases for ls are common, as are aliases adding -i to rm or mv. But type foo would also tell you if foo is an alias or function.






              share|improve this answer























              • The shell built-in commands doesn't support the --version option.
                – GAD3R
                yesterday







              • 1




                @GAD3R, yeah, and neither do the standard utilities on BSDs, or many other tools. For shell builtins, it's of course not necessary, since it's the shell's version that applies, so just go check $BASH_VERSION in case of Bash... And for other utilities, you need to know if they support that option, which you'd find from the man page, leading us back to the original question. :D
                – ilkkachu
                yesterday












              up vote
              4
              down vote



              accepted







              up vote
              4
              down vote



              accepted






              You don't, really. Not without knowledge external to the man page.



              In the case of echo (and printf, and test, ...), it's often a shell builtin, so you'll need to know that and read the shell's documentation.
              (And echo is notoriously different in different implementations, use printf instead.)



              In most, if not all shells, you can find if something is a builtin with type command, e.g. type echo will print echo is a shell builtin. (type is specified by POSIX but e.g. fish supports it too, as non-POSIXy as it is.) In Bash, you'd then read man bash, the online documentation, or use the builtin command help (which is specific to Bash, and which you need to know exists).



              Even if the command is not a builtin, it's possible that there are several commands with the same name, rename being a famous example (see Why is the rename utility on Debian/Ubuntu different than the one on other distributions, like CentOS?). Now, your OS should have the correct man page for the actually installed utility, and e.g. in Debian, the "alternatives" system updates the corresponding man pages also when the command alternatives are changed. But if you read an online man page, you'll need to be aware of it.



              Many utilities have a command line option like --version which might tell you what implementation that command is. (But not nearly all utilities have it. I think it's a GNUism originally, so GNU utilities have it, as well as those that happened to copy the custom.) In the case of rename, it happens to work in telling two different implementations apart:



              debian$ rename --version
              /usr/bin/rename using File::Rename version 0.20
              centos$ rename --version
              rename (util-linux-ng 2.17.2)


              Besides that, your system might have an alias or a function with the same name of a utility, usually to modify the behaviour of the utility. In that case, the defaults presented in a man page might not apply. Aliases for ls are common, as are aliases adding -i to rm or mv. But type foo would also tell you if foo is an alias or function.






              share|improve this answer















              You don't, really. Not without knowledge external to the man page.



              In the case of echo (and printf, and test, ...), it's often a shell builtin, so you'll need to know that and read the shell's documentation.
              (And echo is notoriously different in different implementations, use printf instead.)



              In most, if not all shells, you can find if something is a builtin with type command, e.g. type echo will print echo is a shell builtin. (type is specified by POSIX but e.g. fish supports it too, as non-POSIXy as it is.) In Bash, you'd then read man bash, the online documentation, or use the builtin command help (which is specific to Bash, and which you need to know exists).



              Even if the command is not a builtin, it's possible that there are several commands with the same name, rename being a famous example (see Why is the rename utility on Debian/Ubuntu different than the one on other distributions, like CentOS?). Now, your OS should have the correct man page for the actually installed utility, and e.g. in Debian, the "alternatives" system updates the corresponding man pages also when the command alternatives are changed. But if you read an online man page, you'll need to be aware of it.



              Many utilities have a command line option like --version which might tell you what implementation that command is. (But not nearly all utilities have it. I think it's a GNUism originally, so GNU utilities have it, as well as those that happened to copy the custom.) In the case of rename, it happens to work in telling two different implementations apart:



              debian$ rename --version
              /usr/bin/rename using File::Rename version 0.20
              centos$ rename --version
              rename (util-linux-ng 2.17.2)


              Besides that, your system might have an alias or a function with the same name of a utility, usually to modify the behaviour of the utility. In that case, the defaults presented in a man page might not apply. Aliases for ls are common, as are aliases adding -i to rm or mv. But type foo would also tell you if foo is an alias or function.







              share|improve this answer















              share|improve this answer



              share|improve this answer








              edited yesterday


























              answered yesterday









              ilkkachu

              47.3k668130




              47.3k668130











              • The shell built-in commands doesn't support the --version option.
                – GAD3R
                yesterday







              • 1




                @GAD3R, yeah, and neither do the standard utilities on BSDs, or many other tools. For shell builtins, it's of course not necessary, since it's the shell's version that applies, so just go check $BASH_VERSION in case of Bash... And for other utilities, you need to know if they support that option, which you'd find from the man page, leading us back to the original question. :D
                – ilkkachu
                yesterday
















              • The shell built-in commands doesn't support the --version option.
                – GAD3R
                yesterday







              • 1




                @GAD3R, yeah, and neither do the standard utilities on BSDs, or many other tools. For shell builtins, it's of course not necessary, since it's the shell's version that applies, so just go check $BASH_VERSION in case of Bash... And for other utilities, you need to know if they support that option, which you'd find from the man page, leading us back to the original question. :D
                – ilkkachu
                yesterday















              The shell built-in commands doesn't support the --version option.
              – GAD3R
              yesterday





              The shell built-in commands doesn't support the --version option.
              – GAD3R
              yesterday





              1




              1




              @GAD3R, yeah, and neither do the standard utilities on BSDs, or many other tools. For shell builtins, it's of course not necessary, since it's the shell's version that applies, so just go check $BASH_VERSION in case of Bash... And for other utilities, you need to know if they support that option, which you'd find from the man page, leading us back to the original question. :D
              – ilkkachu
              yesterday




              @GAD3R, yeah, and neither do the standard utilities on BSDs, or many other tools. For shell builtins, it's of course not necessary, since it's the shell's version that applies, so just go check $BASH_VERSION in case of Bash... And for other utilities, you need to know if they support that option, which you'd find from the man page, leading us back to the original question. :D
              – ilkkachu
              yesterday












              up vote
              1
              down vote













              If you want the manual for a built-in command, then you need to look at the manual of your shell. The command will be documented therein, along with all other built-in commands (or there will at least be a reference to where the documentation for builtins is to be found).




              • bash: man bash or help echo from an interactive bash shell.


              • zsh: man zsh (and after a bit of reading, man zshbuiltin)


              • fish: man fish (and after a bit of reading, help echo)

              The manual that you get for man echo documents /bin/echo, i.e. the external echo command. This command is not what you would use when you use echo without an explicit path.






              share|improve this answer























              • As mentioned in my answer, on a user friendly UNIX, you get the documentation for all test versions if you type man test.
                – schily
                yesterday






              • 1




                @schily I'd rather run my unfriendly Unix where I get specific info about exactly what I ask for :-)
                – Kusalananda
                yesterday










              • You do not seem to like useful answers :-( If you did have a look at the sample man page, you did write a more useful answer,
                – schily
                yesterday














              up vote
              1
              down vote













              If you want the manual for a built-in command, then you need to look at the manual of your shell. The command will be documented therein, along with all other built-in commands (or there will at least be a reference to where the documentation for builtins is to be found).




              • bash: man bash or help echo from an interactive bash shell.


              • zsh: man zsh (and after a bit of reading, man zshbuiltin)


              • fish: man fish (and after a bit of reading, help echo)

              The manual that you get for man echo documents /bin/echo, i.e. the external echo command. This command is not what you would use when you use echo without an explicit path.






              share|improve this answer























              • As mentioned in my answer, on a user friendly UNIX, you get the documentation for all test versions if you type man test.
                – schily
                yesterday






              • 1




                @schily I'd rather run my unfriendly Unix where I get specific info about exactly what I ask for :-)
                – Kusalananda
                yesterday










              • You do not seem to like useful answers :-( If you did have a look at the sample man page, you did write a more useful answer,
                – schily
                yesterday












              up vote
              1
              down vote










              up vote
              1
              down vote









              If you want the manual for a built-in command, then you need to look at the manual of your shell. The command will be documented therein, along with all other built-in commands (or there will at least be a reference to where the documentation for builtins is to be found).




              • bash: man bash or help echo from an interactive bash shell.


              • zsh: man zsh (and after a bit of reading, man zshbuiltin)


              • fish: man fish (and after a bit of reading, help echo)

              The manual that you get for man echo documents /bin/echo, i.e. the external echo command. This command is not what you would use when you use echo without an explicit path.






              share|improve this answer















              If you want the manual for a built-in command, then you need to look at the manual of your shell. The command will be documented therein, along with all other built-in commands (or there will at least be a reference to where the documentation for builtins is to be found).




              • bash: man bash or help echo from an interactive bash shell.


              • zsh: man zsh (and after a bit of reading, man zshbuiltin)


              • fish: man fish (and after a bit of reading, help echo)

              The manual that you get for man echo documents /bin/echo, i.e. the external echo command. This command is not what you would use when you use echo without an explicit path.







              share|improve this answer















              share|improve this answer



              share|improve this answer








              edited yesterday


























              answered yesterday









              Kusalananda

              100k13199311




              100k13199311











              • As mentioned in my answer, on a user friendly UNIX, you get the documentation for all test versions if you type man test.
                – schily
                yesterday






              • 1




                @schily I'd rather run my unfriendly Unix where I get specific info about exactly what I ask for :-)
                – Kusalananda
                yesterday










              • You do not seem to like useful answers :-( If you did have a look at the sample man page, you did write a more useful answer,
                – schily
                yesterday
















              • As mentioned in my answer, on a user friendly UNIX, you get the documentation for all test versions if you type man test.
                – schily
                yesterday






              • 1




                @schily I'd rather run my unfriendly Unix where I get specific info about exactly what I ask for :-)
                – Kusalananda
                yesterday










              • You do not seem to like useful answers :-( If you did have a look at the sample man page, you did write a more useful answer,
                – schily
                yesterday















              As mentioned in my answer, on a user friendly UNIX, you get the documentation for all test versions if you type man test.
              – schily
              yesterday




              As mentioned in my answer, on a user friendly UNIX, you get the documentation for all test versions if you type man test.
              – schily
              yesterday




              1




              1




              @schily I'd rather run my unfriendly Unix where I get specific info about exactly what I ask for :-)
              – Kusalananda
              yesterday




              @schily I'd rather run my unfriendly Unix where I get specific info about exactly what I ask for :-)
              – Kusalananda
              yesterday












              You do not seem to like useful answers :-( If you did have a look at the sample man page, you did write a more useful answer,
              – schily
              yesterday




              You do not seem to like useful answers :-( If you did have a look at the sample man page, you did write a more useful answer,
              – schily
              yesterday










              up vote
              0
              down vote













              It should be possible to invoke the non-shell-internal version by giving the full path (which you could get with which echo). There are not separate manpages for shell internals; for documentation on those you'll want to look for the manpage for your shell. The "type" command you mention above is the best way to figure out which you'll get.






              share|improve this answer

















              • 1




                My question was how to tell whether the man page is correct. Perhaps the example was misleading; I am speaking more so of two commands that have the same name (different versions of ps or something), and how to tell whether the info I’m getting from the man page is accurate.
                – extremeaxe5
                2 days ago














              up vote
              0
              down vote













              It should be possible to invoke the non-shell-internal version by giving the full path (which you could get with which echo). There are not separate manpages for shell internals; for documentation on those you'll want to look for the manpage for your shell. The "type" command you mention above is the best way to figure out which you'll get.






              share|improve this answer

















              • 1




                My question was how to tell whether the man page is correct. Perhaps the example was misleading; I am speaking more so of two commands that have the same name (different versions of ps or something), and how to tell whether the info I’m getting from the man page is accurate.
                – extremeaxe5
                2 days ago












              up vote
              0
              down vote










              up vote
              0
              down vote









              It should be possible to invoke the non-shell-internal version by giving the full path (which you could get with which echo). There are not separate manpages for shell internals; for documentation on those you'll want to look for the manpage for your shell. The "type" command you mention above is the best way to figure out which you'll get.






              share|improve this answer













              It should be possible to invoke the non-shell-internal version by giving the full path (which you could get with which echo). There are not separate manpages for shell internals; for documentation on those you'll want to look for the manpage for your shell. The "type" command you mention above is the best way to figure out which you'll get.







              share|improve this answer













              share|improve this answer



              share|improve this answer











              answered 2 days ago









              Pat Gunn

              1212




              1212







              • 1




                My question was how to tell whether the man page is correct. Perhaps the example was misleading; I am speaking more so of two commands that have the same name (different versions of ps or something), and how to tell whether the info I’m getting from the man page is accurate.
                – extremeaxe5
                2 days ago












              • 1




                My question was how to tell whether the man page is correct. Perhaps the example was misleading; I am speaking more so of two commands that have the same name (different versions of ps or something), and how to tell whether the info I’m getting from the man page is accurate.
                – extremeaxe5
                2 days ago







              1




              1




              My question was how to tell whether the man page is correct. Perhaps the example was misleading; I am speaking more so of two commands that have the same name (different versions of ps or something), and how to tell whether the info I’m getting from the man page is accurate.
              – extremeaxe5
              2 days ago




              My question was how to tell whether the man page is correct. Perhaps the example was misleading; I am speaking more so of two commands that have the same name (different versions of ps or something), and how to tell whether the info I’m getting from the man page is accurate.
              – extremeaxe5
              2 days ago










              up vote
              -1
              down vote













              Since the command you want to get information on is a shell built-in, typing help <command name> in the same shell will give you the correct help entry:



              $ help echo
              echo: echo [-neE] [arg ...]
              Write arguments to the standard output.
              ...


              Alternatively, you can type man bash(or whatever shell you are using) and find the builtin you were looking for.



              Unfortunately, there is no easy way to verify that a man page fully matches the command you want to run. Getting the "right" page is trickier than it seems, as that will depend on many factors such as the command's full path, environment variables and aliases, and it's technically impossible for man do account for all such factors. However, after a short while you should develop general understanding of where to look for help.



              If I were to describe a general algorithm of getting the right documentation on most modern *nices, it would look something like this:



              • Do you need help with a built-in (type <command> says it's built-in)?

                • Use help <command> or man <shellname> if help is unavailable in your shell.


              • Do you want your help succinct and technical?

                • Use man <command> (or man <section> <command> if there are multiple entries in different sections, see man man for the list of sections)


              • Do you want your help in the form of a lengthier interactive tutorial/manual (if available)?

                • use info <command>


              • If the above steps fail:

                • Check /usr/share/doc/<package name> for additional documentation on the package, such as HTML pages.

                • Run the command with the -h or --help options, assuming the command is to be trusted. That will oftentimes give a brief summary of what it does and tell you where you can find more information.

                • Google.


              but I must reiterate, this all will become "natural" as one spends some time with the OS.






              share|improve this answer



















              • 1




                Only if the current shell happens to be bash.
                – Kusalananda
                yesterday










              • Correct, on a typical UNIX, you get ERROR: Key 'echo' not found (he1) since help is a command from the SCCS suite.
                – schily
                yesterday










              • @Kusalananda based on OP's tag history I highly suspect the shell in question is bash, but fair enough! I would encourage using help if it's available, however, since it is the most straightforward way of getting help with any builtins your shell has.
                – undercat
                yesterday







              • 1




                On OpenBSD, which does not use bash by default, help is a synonym for man, which would give the wrong version of the manual when used as help echo.
                – Kusalananda
                yesterday














              up vote
              -1
              down vote













              Since the command you want to get information on is a shell built-in, typing help <command name> in the same shell will give you the correct help entry:



              $ help echo
              echo: echo [-neE] [arg ...]
              Write arguments to the standard output.
              ...


              Alternatively, you can type man bash(or whatever shell you are using) and find the builtin you were looking for.



              Unfortunately, there is no easy way to verify that a man page fully matches the command you want to run. Getting the "right" page is trickier than it seems, as that will depend on many factors such as the command's full path, environment variables and aliases, and it's technically impossible for man do account for all such factors. However, after a short while you should develop general understanding of where to look for help.



              If I were to describe a general algorithm of getting the right documentation on most modern *nices, it would look something like this:



              • Do you need help with a built-in (type <command> says it's built-in)?

                • Use help <command> or man <shellname> if help is unavailable in your shell.


              • Do you want your help succinct and technical?

                • Use man <command> (or man <section> <command> if there are multiple entries in different sections, see man man for the list of sections)


              • Do you want your help in the form of a lengthier interactive tutorial/manual (if available)?

                • use info <command>


              • If the above steps fail:

                • Check /usr/share/doc/<package name> for additional documentation on the package, such as HTML pages.

                • Run the command with the -h or --help options, assuming the command is to be trusted. That will oftentimes give a brief summary of what it does and tell you where you can find more information.

                • Google.


              but I must reiterate, this all will become "natural" as one spends some time with the OS.






              share|improve this answer



















              • 1




                Only if the current shell happens to be bash.
                – Kusalananda
                yesterday










              • Correct, on a typical UNIX, you get ERROR: Key 'echo' not found (he1) since help is a command from the SCCS suite.
                – schily
                yesterday










              • @Kusalananda based on OP's tag history I highly suspect the shell in question is bash, but fair enough! I would encourage using help if it's available, however, since it is the most straightforward way of getting help with any builtins your shell has.
                – undercat
                yesterday







              • 1




                On OpenBSD, which does not use bash by default, help is a synonym for man, which would give the wrong version of the manual when used as help echo.
                – Kusalananda
                yesterday












              up vote
              -1
              down vote










              up vote
              -1
              down vote









              Since the command you want to get information on is a shell built-in, typing help <command name> in the same shell will give you the correct help entry:



              $ help echo
              echo: echo [-neE] [arg ...]
              Write arguments to the standard output.
              ...


              Alternatively, you can type man bash(or whatever shell you are using) and find the builtin you were looking for.



              Unfortunately, there is no easy way to verify that a man page fully matches the command you want to run. Getting the "right" page is trickier than it seems, as that will depend on many factors such as the command's full path, environment variables and aliases, and it's technically impossible for man do account for all such factors. However, after a short while you should develop general understanding of where to look for help.



              If I were to describe a general algorithm of getting the right documentation on most modern *nices, it would look something like this:



              • Do you need help with a built-in (type <command> says it's built-in)?

                • Use help <command> or man <shellname> if help is unavailable in your shell.


              • Do you want your help succinct and technical?

                • Use man <command> (or man <section> <command> if there are multiple entries in different sections, see man man for the list of sections)


              • Do you want your help in the form of a lengthier interactive tutorial/manual (if available)?

                • use info <command>


              • If the above steps fail:

                • Check /usr/share/doc/<package name> for additional documentation on the package, such as HTML pages.

                • Run the command with the -h or --help options, assuming the command is to be trusted. That will oftentimes give a brief summary of what it does and tell you where you can find more information.

                • Google.


              but I must reiterate, this all will become "natural" as one spends some time with the OS.






              share|improve this answer















              Since the command you want to get information on is a shell built-in, typing help <command name> in the same shell will give you the correct help entry:



              $ help echo
              echo: echo [-neE] [arg ...]
              Write arguments to the standard output.
              ...


              Alternatively, you can type man bash(or whatever shell you are using) and find the builtin you were looking for.



              Unfortunately, there is no easy way to verify that a man page fully matches the command you want to run. Getting the "right" page is trickier than it seems, as that will depend on many factors such as the command's full path, environment variables and aliases, and it's technically impossible for man do account for all such factors. However, after a short while you should develop general understanding of where to look for help.



              If I were to describe a general algorithm of getting the right documentation on most modern *nices, it would look something like this:



              • Do you need help with a built-in (type <command> says it's built-in)?

                • Use help <command> or man <shellname> if help is unavailable in your shell.


              • Do you want your help succinct and technical?

                • Use man <command> (or man <section> <command> if there are multiple entries in different sections, see man man for the list of sections)


              • Do you want your help in the form of a lengthier interactive tutorial/manual (if available)?

                • use info <command>


              • If the above steps fail:

                • Check /usr/share/doc/<package name> for additional documentation on the package, such as HTML pages.

                • Run the command with the -h or --help options, assuming the command is to be trusted. That will oftentimes give a brief summary of what it does and tell you where you can find more information.

                • Google.


              but I must reiterate, this all will become "natural" as one spends some time with the OS.







              share|improve this answer















              share|improve this answer



              share|improve this answer








              edited yesterday


























              answered yesterday









              undercat

              760212




              760212







              • 1




                Only if the current shell happens to be bash.
                – Kusalananda
                yesterday










              • Correct, on a typical UNIX, you get ERROR: Key 'echo' not found (he1) since help is a command from the SCCS suite.
                – schily
                yesterday










              • @Kusalananda based on OP's tag history I highly suspect the shell in question is bash, but fair enough! I would encourage using help if it's available, however, since it is the most straightforward way of getting help with any builtins your shell has.
                – undercat
                yesterday







              • 1




                On OpenBSD, which does not use bash by default, help is a synonym for man, which would give the wrong version of the manual when used as help echo.
                – Kusalananda
                yesterday












              • 1




                Only if the current shell happens to be bash.
                – Kusalananda
                yesterday










              • Correct, on a typical UNIX, you get ERROR: Key 'echo' not found (he1) since help is a command from the SCCS suite.
                – schily
                yesterday










              • @Kusalananda based on OP's tag history I highly suspect the shell in question is bash, but fair enough! I would encourage using help if it's available, however, since it is the most straightforward way of getting help with any builtins your shell has.
                – undercat
                yesterday







              • 1




                On OpenBSD, which does not use bash by default, help is a synonym for man, which would give the wrong version of the manual when used as help echo.
                – Kusalananda
                yesterday







              1




              1




              Only if the current shell happens to be bash.
              – Kusalananda
              yesterday




              Only if the current shell happens to be bash.
              – Kusalananda
              yesterday












              Correct, on a typical UNIX, you get ERROR: Key 'echo' not found (he1) since help is a command from the SCCS suite.
              – schily
              yesterday




              Correct, on a typical UNIX, you get ERROR: Key 'echo' not found (he1) since help is a command from the SCCS suite.
              – schily
              yesterday












              @Kusalananda based on OP's tag history I highly suspect the shell in question is bash, but fair enough! I would encourage using help if it's available, however, since it is the most straightforward way of getting help with any builtins your shell has.
              – undercat
              yesterday





              @Kusalananda based on OP's tag history I highly suspect the shell in question is bash, but fair enough! I would encourage using help if it's available, however, since it is the most straightforward way of getting help with any builtins your shell has.
              – undercat
              yesterday





              1




              1




              On OpenBSD, which does not use bash by default, help is a synonym for man, which would give the wrong version of the manual when used as help echo.
              – Kusalananda
              yesterday




              On OpenBSD, which does not use bash by default, help is a synonym for man, which would give the wrong version of the manual when used as help echo.
              – Kusalananda
              yesterday










              up vote
              -3
              down vote













              man is split in section:



              1. General Section

              2. System Calls

              3. Library Functions

              4. File Formats

              5. Games and screensavers

              6. Miscellaneous

              7. System administration

              Depending on what you are looking for you can invoke man like that to avoid confusion: man section command.



              For more information you can actually use man man






              share|improve this answer

























                up vote
                -3
                down vote













                man is split in section:



                1. General Section

                2. System Calls

                3. Library Functions

                4. File Formats

                5. Games and screensavers

                6. Miscellaneous

                7. System administration

                Depending on what you are looking for you can invoke man like that to avoid confusion: man section command.



                For more information you can actually use man man






                share|improve this answer























                  up vote
                  -3
                  down vote










                  up vote
                  -3
                  down vote









                  man is split in section:



                  1. General Section

                  2. System Calls

                  3. Library Functions

                  4. File Formats

                  5. Games and screensavers

                  6. Miscellaneous

                  7. System administration

                  Depending on what you are looking for you can invoke man like that to avoid confusion: man section command.



                  For more information you can actually use man man






                  share|improve this answer













                  man is split in section:



                  1. General Section

                  2. System Calls

                  3. Library Functions

                  4. File Formats

                  5. Games and screensavers

                  6. Miscellaneous

                  7. System administration

                  Depending on what you are looking for you can invoke man like that to avoid confusion: man section command.



                  For more information you can actually use man man







                  share|improve this answer













                  share|improve this answer



                  share|improve this answer











                  answered 2 days ago









                  Claudio Cortese

                  1048




                  1048




















                      up vote
                      -3
                      down vote













                      If your OS distro does not have man pages for those programs that mention the differences, you should make bug report.



                      In fact, this is the task of the distro creators, but if you type:



                      type cmdname


                      you will get output whether cmdname is a shell builtin. If you know what shell you are using, you could run:



                      man shellname


                      replacing shellname with the name ouf your shell. The man page of your shell should contain information about builtin commands.



                      Let me give an example on how a user friendly UNIX should document this: http://schillix.sourceforge.net/man/man1/test.1.html






                      share|improve this answer



























                        up vote
                        -3
                        down vote













                        If your OS distro does not have man pages for those programs that mention the differences, you should make bug report.



                        In fact, this is the task of the distro creators, but if you type:



                        type cmdname


                        you will get output whether cmdname is a shell builtin. If you know what shell you are using, you could run:



                        man shellname


                        replacing shellname with the name ouf your shell. The man page of your shell should contain information about builtin commands.



                        Let me give an example on how a user friendly UNIX should document this: http://schillix.sourceforge.net/man/man1/test.1.html






                        share|improve this answer

























                          up vote
                          -3
                          down vote










                          up vote
                          -3
                          down vote









                          If your OS distro does not have man pages for those programs that mention the differences, you should make bug report.



                          In fact, this is the task of the distro creators, but if you type:



                          type cmdname


                          you will get output whether cmdname is a shell builtin. If you know what shell you are using, you could run:



                          man shellname


                          replacing shellname with the name ouf your shell. The man page of your shell should contain information about builtin commands.



                          Let me give an example on how a user friendly UNIX should document this: http://schillix.sourceforge.net/man/man1/test.1.html






                          share|improve this answer















                          If your OS distro does not have man pages for those programs that mention the differences, you should make bug report.



                          In fact, this is the task of the distro creators, but if you type:



                          type cmdname


                          you will get output whether cmdname is a shell builtin. If you know what shell you are using, you could run:



                          man shellname


                          replacing shellname with the name ouf your shell. The man page of your shell should contain information about builtin commands.



                          Let me give an example on how a user friendly UNIX should document this: http://schillix.sourceforge.net/man/man1/test.1.html







                          share|improve this answer















                          share|improve this answer



                          share|improve this answer








                          edited yesterday


























                          answered yesterday









                          schily

                          8,38721435




                          8,38721435






















                               

                              draft saved


                              draft discarded


























                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460567%2fhow-do-i-know-if-the-man-page-im-looking-at-is-the-correct-one%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              How to check contact read email or not when send email to Individual?

                              Displaying single band from multi-band raster using QGIS

                              How many registers does an x86_64 CPU actually have?