Skip to main content
corrected confusion between `man -k` and `man -K`; grammar
Source Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k

AIn addition to apropos (which can also be written man -k), a useful command for mi is man -K [key_word]key_word this search(capital K). This searches for a man page with the 'key_word' anywhere in the short description of the man page (man -k searches only in the short description part). TheEither way, the result are showshown with the section between brackets:

[gojan@Gonux ~]$ man -K copy ... cp (1) - copy files and directories cp (1p) - copy files ... 

You can use this number to avoid ambiguity like:

[gojan@Gonux ~]$ man 1 cp CP(1) User Commands CP(1) NAME cp - copy files and directories ... [gojan@Gonux ~]$ man 1p cp CP(1P) POSIX Programmer's Manual CP(1P) PROLOG This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. 

A useful command for mi is man -K [key_word] this search for a man page with the 'key_word' in the short description of the man page. The result are show with the section between brackets:

[gojan@Gonux ~]$ man -K copy ... cp (1) - copy files and directories cp (1p) - copy files ... 

You can use this number to avoid ambiguity like:

[gojan@Gonux ~]$ man 1 cp CP(1) User Commands CP(1) NAME cp - copy files and directories ... [gojan@Gonux ~]$ man 1p cp CP(1P) POSIX Programmer's Manual CP(1P) PROLOG This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. 

In addition to apropos (which can also be written man -k), a useful command is man -K key_word (capital K). This searches for a man page with the 'key_word' anywhere in the man page (man -k searches only in the short description part). Either way, the result are shown with the section between brackets:

[gojan@Gonux ~]$ man -K copy ... cp (1) - copy files and directories cp (1p) - copy files ... 

You can use this number to avoid ambiguity like:

[gojan@Gonux ~]$ man 1 cp CP(1) User Commands CP(1) NAME cp - copy files and directories ... [gojan@Gonux ~]$ man 1p cp CP(1P) POSIX Programmer's Manual CP(1P) PROLOG This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. 
change '-k' to '-K' (http://www.linuxmanpages.com/man1/man.1.php)
Source Link

A useful command for mi is man -kK [key_word] this search for a man page with the 'key_word' in the short description of the man page. The result are show with the section between brackets:

[gojan@Gonux ~]$ man -kK copy ... cp (1) - copy files and directories cp (1p) - copy files ... 

You can use this number to avoid ambiguity like:

[gojan@Gonux ~]$ man 1 cp CP(1) User Commands CP(1) NAME cp - copy files and directories ... [gojan@Gonux ~]$ man 1p cp CP(1P) POSIX Programmer's Manual CP(1P) PROLOG This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. 

A useful command for mi is man -k [key_word] this search for a man page with the 'key_word' in the short description of the man page. The result are show with the section between brackets:

[gojan@Gonux ~]$ man -k copy ... cp (1) - copy files and directories cp (1p) - copy files ... 

You can use this number to avoid ambiguity like:

[gojan@Gonux ~]$ man 1 cp CP(1) User Commands CP(1) NAME cp - copy files and directories ... [gojan@Gonux ~]$ man 1p cp CP(1P) POSIX Programmer's Manual CP(1P) PROLOG This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. 

A useful command for mi is man -K [key_word] this search for a man page with the 'key_word' in the short description of the man page. The result are show with the section between brackets:

[gojan@Gonux ~]$ man -K copy ... cp (1) - copy files and directories cp (1p) - copy files ... 

You can use this number to avoid ambiguity like:

[gojan@Gonux ~]$ man 1 cp CP(1) User Commands CP(1) NAME cp - copy files and directories ... [gojan@Gonux ~]$ man 1p cp CP(1P) POSIX Programmer's Manual CP(1P) PROLOG This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. 
Source Link

A useful command for mi is man -k [key_word] this search for a man page with the 'key_word' in the short description of the man page. The result are show with the section between brackets:

[gojan@Gonux ~]$ man -k copy ... cp (1) - copy files and directories cp (1p) - copy files ... 

You can use this number to avoid ambiguity like:

[gojan@Gonux ~]$ man 1 cp CP(1) User Commands CP(1) NAME cp - copy files and directories ... [gojan@Gonux ~]$ man 1p cp CP(1P) POSIX Programmer's Manual CP(1P) PROLOG This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. 
Post Made Community Wiki