剛發現自己從沒認真用過 apropos。用法極簡單:apropos [keyword],它就會列出與該關鍵字相關的指令。實際上它搜尋的是其他命令的描述文字,把符合的項目一口氣列出來。
它未必能直接給你答案,但作為「提示詞」非常有用——很多時候你只是暫時想不起那個指令叫什麼,掃一眼列表就回來了。查完整用法請下 man apropos。
apropos sort alphasort [scandir] (3) - scan a directory for matching entries bsearch (3) - binary search of a sorted array bsearch (3p) - binary search a sorted table bunzip2 (1) - a block-sorting file compressor, v1.0.2 bunzip2 [bzcat] (1) - a block-sorting file compressor, v1.0.2 bunzip2 [bzip2] (1) - a block-sorting file compressor, v1.0.2 bunzip2 [bzip2recover] (1) - a block-sorting file compressor, v1.0.2 bzip2 (1) - a block-sorting file compressor, v1.0.2 bzip2 [bunzip2] (1) - a block-sorting file compressor, v1.0.2 comm (1) - compare two sorted files line by line ldap_sort_entries (3) - LDAP sorting routines ldap_sort_entries [ldap_sort] (3) - LDAP sorting routines
括號中的數字代表手冊章節:1 是使用者指令、3 是函式庫、5 是設定檔格式、8 是管理工具。學會看這個編號,你查 man 時的速度也會跟著變快。