Don't forget the locate(1)
command. If this is set up, updatedb
runs nightly on your machine and creates an index of all files. Then for example
$ locate myprogram
will give you every file which contains myprogram
(in the filename or path) on the system.
If you know the exact name of the binary, you can use a regexp match to find it, for example:
$ locate --regexp="myprogram$"
will list all files which end in myprogram
on your system.
Two caveats:
- Many systems ship with updatedb turned off by default.
- The index is generally rebuilt once a day, so it will always be somewhat out-of-date.
locate
can be a good way to get a sense of where on the system a particular file might be, before you drill down to looking for the package.