skip to main | skip to sidebar

OPEN SOURCE

Linux for Better life

  • Home
  • Trik-Tips
  • Free Template
  • Blogger Hack
  • Free Ebook

UNIX and LINUX part 13


Module 5
apropos (BSD)
DESCRIPTION
The external apropos command searches for keywords in the header lines of all UNIX Reference Manual entries. There is one manual entry for each UNIX command distributed with your system. These entries are often referred to as "man pages." The header line for each command entry is a brief one-line description of the command.
If you need to use a command but do not know its name, you can use apropos to search for the command by specifying keywords. You specify keywords on the apropos command line. Each keyword is searched for separately in the header lines of all manual entries. If a keyword is located in the title (header line) of a man page, the command's title is displayed. The search ignores the case of letters.
A match occurs even if the keyword is a part of a word in the title. For example, if you specify
apropos command

all titles with the word "command" and "commands" would be displayed.
COMMAND FORMAT
Following is the general format of the apropos command.
apropos keyword [ ... ]

Arguments
The following list describes the arguments that may be passed to the apropos command.
keyword A word you want to search for in the title of all the manual sections.
FURTHER DISCUSSION
The apropos command is the same as the man -k keyword command. If apropos displays a line for a keyword that begins with name(section) ..., you can display the entire manual page by entering the command:
man section name

To display the title line of each manual page that contains the keyword "editor" you specify a apropos command like:
apropos editor

which should return the following output:
a,out (5) - assembler and link editor output format
ed, red (1) - basic line editor
ex, edit (1) - line editor
ld (1) - link editor
sed (1) - stream text editor
vi, view (1) - visual display editor based on ex(1)

The output from your system may vary depending on which utilities have been implemented and installed on your particular system.
DIAGNOSTICS AND BUGS
If apropos fails to work, it is possible the /usr/lib/whatis file has not been created. The system administrator creates this file by changing directories to /usr/lib and executing mkwhatis or makewhatis, depending on your system's command name.
RELATED COMMANDS
Refer to the man and whatis commands described in modules 87 and 155.
RELATED FILES
The apropos command looks in a file containing the titles for all of the manual documents, usually the /usr/lib/whatis.
APPLICATIONS
The apropos command provides a way for you to search for a command to perform a certain function based on keywords. For example, if you needed to display the contents of a file, you could use apropos and specify several keywords that referred to displaying contents of files. For example, you might try the command,
apropos print display show type file

The trick to making apropos work is being flexible in your choice of keywords. Flexible means you should try to remember as many synonyms for a word as you can.
There are trade-offs in how you use keywords. If you use too many or too broad of a word, such as file, you may get pages of output. On the other hand, if you use a very selective set of keywords, you may get no output. The basic advice is to try a few different keywords to get the general idea of how the titles of the man pages are written. Unfortunately, experience is still the best teacher, especially when UNIX man pages are involved.
TYPICAL OPERATION
In this activity you use the apropos command to locate commands related to text. Begin at the shell prompt.
1. Type apropos text and press Return. Depending on your system, the output should resemble the following:
cj> apropos text
nawk(1) - text pattern scanning and processing language
csplit(1) - context split
ed, red (1) - text editor
edit(1) - text editor (variant of ex for casual users)
end, etext, edata(3C) - last locations in program
ex(1) - text editor
fspec(4) - format specification in text files
lex(1) - generate programs for lexical analysis of text
neqn(1) - format mathematical text for nroff
nroff(1) - format text
plock(2) - lock process, text, or data in memory
sed(1) - stream text editor

Posted by MALIK

Labels: APPLICATIO, BSD, command, DIAGNOSTIC, editor, unix

Newer Post Older Post Home

Links

  • ALJAZEERA TV
  • ANTARA
  • Bali`s Blogger
  • BBC
  • BERITANET.COM
  • CHIP ONLINE
  • CNN
  • DETIK.COM
  • E-BOOK
  • Economic
  • Friends
  • Friendster's Blog
  • Habibieafsyah
  • HARVARD UNIVERSITY
  • ILMU KOMPUTER
  • INFO LINUX
  • KICK ANDY
  • LINUX OpenSuse
  • LINUX SLAX
  • Linux Temanggung
  • LINUX UBUNTU
  • LIPUTAN 6 SCTV
  • MASTER BLOGGER
  • METROTV NEWS
  • MUSIC DOWNLOAD
  • My Class
  • Robotic AMIKOM
  • SMA N 3 TEMANGGUNG
  • SMART E-LEARNING
  • SOFTPEDIA
  • STMIK AMIKOM
  • SUPPORTED BLOGGER
  • TIPS TRICKS
  • TRIAL FILM
  • TV ONE ONLINE

Blog Archive

  • ► 2009 (38)
    • ► 05/31 - 06/07 (1)
    • ► 02/15 - 02/22 (1)
    • ► 01/11 - 01/18 (11)
    • ► 01/04 - 01/11 (25)
  • ▼ 2008 (70)
    • ► 11/30 - 12/07 (22)
    • ▼ 11/16 - 11/23 (18)
      • UNIX and LINUX part 16
      • UNIX and LINUX part 15
      • UNIX and LINUX part 14
      • UNIX and LINUX part 13
      • UNIX and LINUX part 12
      • UNIX and LINUX part 11
      • UNIX and LINUX part 10
      • UNIX and LINUX part 9
      • UNIX and LINUX part 8
      • UNIX and LINUX part 7
      • UNIX and LINUX part 7
      • UNIX and LINUX part 6
      • UNIX and LINUX part 5
      • UNIX and LINUX part 4
      • UNIX and LINUX part 3
      • UNIX and LINUX part 2
      • UNIX and LINUX part 1
      • A SAMPLE SESSION WITH UNIX USER COMMANDS
    • ► 11/09 - 11/16 (1)
    • ► 10/26 - 11/02 (5)
    • ► 10/19 - 10/26 (16)
    • ► 10/12 - 10/19 (4)
    • ► 10/05 - 10/12 (4)



$100.00 Anda pasti untung setelah registrasi!






Search Engine Optimization and SEO Tools







Bookmark CO.CC:Free Domain