4 ms·
$ man apropos apropos searches a set of database files containing short descriptions of system commands for keywords and displays the result on the sta
by jdludlow 14y ago
$ man apropos
apropos searches a set of database files containing
short descriptions of system commands for keywords and
displays the result on the standard output.
It answers the question "I wonder how to do [this English word]."
For example: "I wonder how I copy a file."
$ apropos copy
Dumps out all of the matching entries from the man pages for the word "copy". If you just wanted general commands, as opposed to library functions, and assuming your system organizes man page sections in the typical manner, you can filter it down with:
$ apropos copy | grep "(1)"
cp (1) - copy files and directories
cpio (1) - copy files to and from archives
- greyfade 14y agoInstead of using `grep "(1)"`, use the `-s` switch: $ apropos -s1 copy bsdcpio (1) - copy files to and from archives cp (1) - copy files and directories dd (1) - convert and copy a file ....
- barrkel 14y agoI think it's better to use grep. Knowing the options to apropos has very low value. Knowing grep has lots and lots of value.
- tomp 14y agoI agree. I have no idea how to use `find`. I always do `find . | grep whatever`, since I know the basics of grep.
- Dobbs 14y agoLearning find is a worthy investment. find ./ -name "*.log" -size +2G -ctime +3 | xargs -P 8 gzip Will find all log files over 2 gigs and older than 3 days. Then it will gzip them split across 8 parallel gzip processes.