apropos
Date: Tuesday, January 29 @ 07:42:58 CST
Topic: Commands You Should Know How to Use


Have you ever wanted to accomplish something in linux but wasn't sure how to do it? Or maybe, you know there is a command that does something but can't remember the command? We have all run into this. With linux, there are literally thousands of commands and we can't possibly remember them all. To help with this situation, we have a command known as apropos.

From the apropos man page:



[code]
apropos(1) apropos(1)



NAME
apropos - search the whatis database for strings

SYNOPSIS
apropos keyword ...

DESCRIPTION
apropos searches a set of database files containing short descriptions of system commands for keywords and displays the result on the
standard output.

AUTHOR
John W. Eaton was the original author of man. Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3
thru 1.5p. Federico Lucifredi

As an example, lets say we want to do something with an mpeg file, maybe encode an mpeg file. We can't remember the command, however, if you can remember apropos, it will help you find the command you are looking for. Here is an example using mpeg as the keyword:

[code]
ewiget@urf ~ $ apropos mpeg
.br mp2enc [mp2enc] (1) - Simple MPEG-1 layer-II audio encoder
.br mplex [mplex] (1) - MPEG 1/2 program/system stream multiplexer
GPAC [gpac] (1) - MPEG-4 Systems Framework and Software Development Kit
MP4Box [mp4box] (1) - MPEG-4 Systems Toolbox
MP4Client [mp4client] (1) - GPAC MPEG-4 command-line Player
Vive [vive] (1) - GTK2 frontend for encoding video via ffmpeg and ripping DVDs with vobcopy
Vive [vive] (5) - Preferences file for the GTK+-2.0 frontend for ffmpeg
YUV4MPEG2 [yuv4mpeg] (5) - video stream format used by pipe-based MJPEGtools
cdxa2mpeg (1) - manual page for cdxa2mpeg 0.7.23
dvdauthor (1) - assembles multiple mpeg program streams into a suitable DVD filesystem
extract_a52 (1) - extract ATSC A/52 audio from a MPEG stream
extract_a52 [extract_dts] (1) - extract ATSC A/52 audio from a MPEG stream
extract_dca (1) - extract DTS Coherent Acoustics audio from a MPEG stream
extract_mpeg2 (1) - extract MPEG video streams from a multiplexed stream
ffmpeg (1) - FFmpeg video converter
gtv (1) - MPEG audio (MP3) and video (MPEG-1) player with GTK+ GUI
images2mpg (1) - MPEG portfolio images multiplexer
lav2mpeg (1) - easy conversion of lav files to mpeg
madplay (1) - decode and play MPEG audio stream(s)
mpeg2dec (1) - decode MPEG and MPEG2 video streams
mpeg2desc (1) - multiplex audio/video streams
mpeg2enc (1) - MPEG-1/2 encoder
mpg123 (1) - play audio MPEG 1.0/2.0/2.5 stream (layers 1, 2 and 3)
pgmtoy4m (1) - Convert mpeg2dec pgm and pgmpipe output to YUV4MPEG2
plaympeg (1) - MPEG audio (MP3) and video (MPEG-1) player
png2yuv (1) - Convert PNG images to the YUV4MPEG stream format
pnmtoy4m (1) - Convert PNM/PAM images to YUV4MPEG2 stream
ppmtompeg (1) - encode an MPEG-1 bitstream
ppmtoy4m (1) - Convert PPM images to YUV4MPEG2 stream
spumux (1) - generates and multiplexes subtitles into an existing mpeg2 program stream
spuunmux (1) - demultiplexes subtitles from an existing mpeg2 program stream
twolame (1) - an optimised MPEG Audio Layer 2 (MP2) encoder
y4mcolorbars (1) - Create a YUV4MPEG2 stream containing a colorbar test pattern
y4mdenoise (1) - Motion-compensating YUV4MPEG-frame denoiser
y4mtopnm (1) - Convert a YUV4MPEG2 stream to PNM images
y4mtoppm (1) - Convert YUV4MPEG2 stream to PPM images
y4munsharp (1) - Unsharp filter for YUV4MPEG2 streams
yuvdenoise (1) - Motion-Compensating-YUV4MPEG2-frame-denoiser
yuvplay (1) - Display YUV4MPEG2 streams (using SDL)
yuvscaler (1) - UPscales or DOWNscales a YUV4MPEG2 stream to a specified format
[/code]

The above results searches the entire man database for keywords matching mpeg. It returns all of the results, which we can then use to narrow the command down we need to encode mpeg files. Using the above as an example, twolame looks like it fits the bill.

The apropos command can often be used with or without the whatis command.



Ed Wiget, http://www.edwiget.name, has been a linux/unix system admin since 1995. He has many certifications. He is currently working on a degree in computer engineering, with an emphasis on computer/network security and forensics.



This article comes from Maysville Linux Users Group (MLUG) - Linux Users Helping Linux Users
http://www.maysville-linux-users-group.org

The URL for this story is:
http://www.maysville-linux-users-group.org/modules.php?name=News&file=article&sid=112