As a Unix beginner, I often find myself wanting to know the name of the command that achieves a particular function I'm after. How can I go about finding out the name of the command, given a description of what it does?
A good starting point, if you don't know the exact command name, is
apropos. You'll find a short description here or with
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.
You might want to print out or bookmark a cheat sheet. I like this one which is the first result on the Google search for "unix cheat sheet" for a reason.
To be honest, I find myself in the same situation that you are quite often. Even though I'm not a beginner.
But knowing which tool does what is, is something that will haunt you forever, especially, since new tools are coming in quite fast, are Distro dependent, and the UI changes sometimes from version to version (as with
tar, that changed the meaning of the
-J switch recently).
Here's what I'm doing:
- I use Fedora, which uses RPM for package management. Suppose I'm looking for a tool that helps me edit ID3-Tags. I'd just use:
yum find ID3.
- In case I don't find what I'm looking for, I'd consult Wikipedia. It sounds lazy and strange, but it's really quite reliable: http://en.wikipedia.org/wiki/Tag_editor#List_of_tag_editors
- Now, when I know what I'm basically looking for, but can't find the tool that suits me or the functionality in question (i.e. details, or comparison), I'd ask around on IRC or even here.