What was that command again?


What will you do if you forgot the command name you want to run on your Linux box? Yeah, right! You will google it. But what if you have no access to internet. Don't worry apropos command is there to save you. 


The command apropos which means appropriate or relevant in English search the man pages and its description for a keyword and display them on the screen. This command is useful when you are not sure about the exact command you want to use.


Usage:

apropos keyword

apropos "string"

Few examples of apropos

To find all disk related commands



apropos disk

Sample Output:
arm_sync_file_range (2) - sync a file segment with disk
baobab (1)           - A graphical tool to analyse disk usage
cdrecord (1)         - write data to optical disk media
cfdisk (8)           - display or manipulate disk partition table
cgdisk (8)           - Curses-based GUID partition table (GPT) manipulator
devkit-disks (1)     - udisks command line tool
df (1)               - report file system disk space usage
df (1p)              - report free disk space
disk_selinux (8)     - Security Enhanced Linux Policy for the disk processes
dvdrecord (1)        - write data to optical disk media
fd (4)               - floppy disk device
fdformat (8)         - low-level format a floppy disk
fdisk (8)            - manipulate disk partition table
floppy (8)           - format floppy disks
gdisk (8)            - Interactive GUID partition table (GPT) manipulator
hd (4)               - MFM/IDE hard disk devices
htcacheclean (8)     - Clean up the disk cache
iagno (6)            - A disk flipping game derived from Reversi.
ideviceimagemounter (1) - Mount disk images on the device.
initrd (4)           - boot loader initialized RAM disk
lvmdiskscan (8)      - scan for all devices visible to LVM2
lvscan (8)           - scan (all disks) for Logical Volumes
mbadblocks (1)       - tests a floppy disk, and marks the bad blocks in the FAT
mcat (1)             - dump raw disk image
mformat (1)          - add an MSDOS filesystem to a low-level formatted floppy disk
mmount (1)           - mount an MSDOS disk
mpartition (1)       - partition an MSDOS hard disk
mtools (1)           - utilities to access DOS disks in Unix.
mzip (1)             - change protection mode and eject disk on Zip/Jaz drive
netscsid (1)         - write data to optical disk media
partx (8)            - tell the Linux kernel about the presence and numbering of on-disk partitions
pvcreate (8)         - initialize a disk or partition for use by LVM
pvresize (8)         - resize a disk or partition in use by LVM2
pvscan (8)           - scan all disks for physical volumes
qdiskd_selinux (8)   - Security Enhanced Linux Policy for the qdiskd processes
qemu-img (1)         - QEMU disk image utility
qemu-nbd (8)         - QEMU Disk Network Block Device Server
quota (1)            - display disk usage and limits
quotacheck (8)       - scan a filesystem for disk usage, create, check and repair quota files
quotactl (2)         - manipulate disk quotas
ram (4)              - ram disk device
sd (4)               - Driver for SCSI Disk Drives
selinux_file_context_verify (3) - Compare the SELinux security context on disk to the default security context required by the policy file contexts...
setquota (8)         - set disk quotas
sfdisk (8)           - partition table manipulator for Linux
sgdisk (8)           - Command-line GUID partition table (GPT) manipulator for Linux and Unix
smartctl (8)         - Control and Monitor Utility for SMART Disks
smartd (8)           - SMART Disk Monitoring Daemon
smartd.conf (5)      - SMART Disk Monitoring Daemon Configuration File
sync (2)             - commit buffer cache to disk
sync (8)             - synchronize data on disk with memory
sync_file_range (2)  - sync a file segment with disk
sync_file_range2 (2) - sync a file segment with disk
syncfs (2)           - commit buffer cache to disk
Tie::File (3pm)      - Access the lines of a disk file via a Perl array
udisks (1)           - udisks command line tool
udisks (7)           - Storage Management
udisks (8)           - storage management
udisks-daemon (8)    - udisks Daemon
udisks-tcp-bridge (1) - udisks TCP/IP bridge
udisksctl (1)        - udisks command line tool
udisksd (8)          - udisks daemon
vgscan (8)           - scan all disks for volume groups and rebuild caches
wodim (1)            - write data to optical disk media

To find a command to copy files
apropos "copy files"
Sample Output:
cp (1)               - copy files and directories
cp (1p)              - copy files
cpio (1)             - copy files to and from archives
File::Copy (3pm)     - Copy files or filehandles
install (1)          - copy files and set attributes

apropos is a useful command not just for rookies but for all level of linux users. You can learn and explore more commands on linux and unix with apropos. For more information refer apropos man pages


Comments

Popular posts from this blog

Understanding awk command with examples

Understanding sed command with example -Part 1

How to install a Software in Linux