Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> Linux 指令

用 apropos 找出所有與 sort 相關的指令

以前一直沒注意到 apropos 這個好用的工具。只要輸入 apropos [關鍵字],就能列出與該關鍵字功能相關的指令。它實際做的是搜尋其他指令的描述資訊,把相關指令彙整出來——不一定第一個就是你要的,但往往能幫你回想起真正需要的那個指令。

使用方法很簡單,細節可參考 man apropos。以下用 apropos 查找與 sort 相關的指令:

apropos sort
alphasort [scandir] (3) - scan a directory for matching entries
bsearch        (3) - binary search of a sorted array
bunzip2        (1) - a block-sorting file compressor
bzip2         (1) - a block-sorting file compressor
comm          (1) - compare two sorted files line by line
qsort         (3) - sorts an array
sort          (1) - sort lines of text files
tsort         (1) - perform topological sort
uniq         (1) - remove duplicate lines from a sorted file

從這份清單裡,除了核心的 sort,你還能意外發現 comm、uniq、tsort 等實用工具,這正是 apropos 的迷人之處。

Copyright © Linux教程網 All Rights Reserved