How do I know if the man page I'm looking at is the correct one?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
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?
man
add a comment |Â
up vote
2
down vote
favorite
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?
man
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
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?
man
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?
man
edited yesterday
Kusalananda
100k13199311
100k13199311
asked 2 days ago
extremeaxe5
1875
1875
add a comment |Â
add a comment |Â
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.
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
add a comment |Â
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
orhelp echo
from an interactivebash
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.
As mentioned in my answer, on a user friendly UNIX, you get the documentation for alltest
versions if you typeman 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
add a comment |Â
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.
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
add a comment |Â
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>
orman <shellname>
ifhelp
is unavailable in your shell.
- Use
- Do you want your help succinct and technical?
- Use
man <command>
(orman <section> <command>
if there are multiple entries in different sections, seeman man
for the list of sections)
- Use
- Do you want your help in the form of a lengthier interactive tutorial/manual (if available)?
- use
info <command>
- use
- 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.
- Check
but I must reiterate, this all will become "natural" as one spends some time with the OS.
1
Only if the current shell happens to bebash
.
â Kusalananda
yesterday
Correct, on a typical UNIX, you getERROR: Key 'echo' not found (he1)
sincehelp
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 usinghelp
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 usebash
by default,help
is a synonym forman
, which would give the wrong version of the manual when used ashelp echo
.
â Kusalananda
yesterday
add a comment |Â
up vote
-3
down vote
man
is split in section:
- General Section
- System Calls
- Library Functions
- File Formats
- Games and screensavers
- Miscellaneous
- 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
add a comment |Â
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
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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.
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
add a comment |Â
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
add a comment |Â
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
orhelp echo
from an interactivebash
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.
As mentioned in my answer, on a user friendly UNIX, you get the documentation for alltest
versions if you typeman 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
add a comment |Â
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
orhelp echo
from an interactivebash
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.
As mentioned in my answer, on a user friendly UNIX, you get the documentation for alltest
versions if you typeman 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
add a comment |Â
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
orhelp echo
from an interactivebash
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.
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
orhelp echo
from an interactivebash
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.
edited yesterday
answered yesterday
Kusalananda
100k13199311
100k13199311
As mentioned in my answer, on a user friendly UNIX, you get the documentation for alltest
versions if you typeman 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
add a comment |Â
As mentioned in my answer, on a user friendly UNIX, you get the documentation for alltest
versions if you typeman 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
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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.
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
add a comment |Â
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
add a comment |Â
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>
orman <shellname>
ifhelp
is unavailable in your shell.
- Use
- Do you want your help succinct and technical?
- Use
man <command>
(orman <section> <command>
if there are multiple entries in different sections, seeman man
for the list of sections)
- Use
- Do you want your help in the form of a lengthier interactive tutorial/manual (if available)?
- use
info <command>
- use
- 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.
- Check
but I must reiterate, this all will become "natural" as one spends some time with the OS.
1
Only if the current shell happens to bebash
.
â Kusalananda
yesterday
Correct, on a typical UNIX, you getERROR: Key 'echo' not found (he1)
sincehelp
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 usinghelp
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 usebash
by default,help
is a synonym forman
, which would give the wrong version of the manual when used ashelp echo
.
â Kusalananda
yesterday
add a comment |Â
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>
orman <shellname>
ifhelp
is unavailable in your shell.
- Use
- Do you want your help succinct and technical?
- Use
man <command>
(orman <section> <command>
if there are multiple entries in different sections, seeman man
for the list of sections)
- Use
- Do you want your help in the form of a lengthier interactive tutorial/manual (if available)?
- use
info <command>
- use
- 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.
- Check
but I must reiterate, this all will become "natural" as one spends some time with the OS.
1
Only if the current shell happens to bebash
.
â Kusalananda
yesterday
Correct, on a typical UNIX, you getERROR: Key 'echo' not found (he1)
sincehelp
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 usinghelp
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 usebash
by default,help
is a synonym forman
, which would give the wrong version of the manual when used ashelp echo
.
â Kusalananda
yesterday
add a comment |Â
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>
orman <shellname>
ifhelp
is unavailable in your shell.
- Use
- Do you want your help succinct and technical?
- Use
man <command>
(orman <section> <command>
if there are multiple entries in different sections, seeman man
for the list of sections)
- Use
- Do you want your help in the form of a lengthier interactive tutorial/manual (if available)?
- use
info <command>
- use
- 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.
- Check
but I must reiterate, this all will become "natural" as one spends some time with the OS.
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>
orman <shellname>
ifhelp
is unavailable in your shell.
- Use
- Do you want your help succinct and technical?
- Use
man <command>
(orman <section> <command>
if there are multiple entries in different sections, seeman man
for the list of sections)
- Use
- Do you want your help in the form of a lengthier interactive tutorial/manual (if available)?
- use
info <command>
- use
- 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.
- Check
but I must reiterate, this all will become "natural" as one spends some time with the OS.
edited yesterday
answered yesterday
undercat
760212
760212
1
Only if the current shell happens to bebash
.
â Kusalananda
yesterday
Correct, on a typical UNIX, you getERROR: Key 'echo' not found (he1)
sincehelp
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 usinghelp
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 usebash
by default,help
is a synonym forman
, which would give the wrong version of the manual when used ashelp echo
.
â Kusalananda
yesterday
add a comment |Â
1
Only if the current shell happens to bebash
.
â Kusalananda
yesterday
Correct, on a typical UNIX, you getERROR: Key 'echo' not found (he1)
sincehelp
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 usinghelp
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 usebash
by default,help
is a synonym forman
, which would give the wrong version of the manual when used ashelp 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
add a comment |Â
up vote
-3
down vote
man
is split in section:
- General Section
- System Calls
- Library Functions
- File Formats
- Games and screensavers
- Miscellaneous
- 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
add a comment |Â
up vote
-3
down vote
man
is split in section:
- General Section
- System Calls
- Library Functions
- File Formats
- Games and screensavers
- Miscellaneous
- 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
add a comment |Â
up vote
-3
down vote
up vote
-3
down vote
man
is split in section:
- General Section
- System Calls
- Library Functions
- File Formats
- Games and screensavers
- Miscellaneous
- 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
man
is split in section:
- General Section
- System Calls
- Library Functions
- File Formats
- Games and screensavers
- Miscellaneous
- 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
answered 2 days ago
Claudio Cortese
1048
1048
add a comment |Â
add a comment |Â
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
add a comment |Â
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
add a comment |Â
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
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
edited yesterday
answered yesterday
schily
8,38721435
8,38721435
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password