
マニュアル ページを開くと、オプションが膨大でコンテキストがほとんどない、テキストの壁のように見えることがよくあります。しかし、マニュアル ページは、コマンドの使用方法に関する情報の宝庫です。
では、マニュアル ページを理解するにはどうすればよいでしょうか? 標準セクションの内容は何ですか? どのように構成されていますか? マニュアルを理解しやすくするメンタル マップはありますか?
テキストに色を追加するなど、ナビゲートしやすくするためのヒントはありますか。
答え1
私は、man ページを基本的な学習ソースとは見ていません。man ページは、すでにやり方がわかっていることを思い出すための便利なトリガーだと考えています。
Usually you can find tutorials or how-tos on the internet which teach how and why things go together the way they do. Then when you come to actually do it, you read the man pages to remind yourself of the particular flag or syntax of how to get it done. My personal rule of thumb is that if I can't figure out what I need to do in two passes of the man page, I need Google... and probably to create some notes for myself.
Usually I find that less
is the best man page viewer for me; I can scroll up and down and do searches in it to find the words I am looking for.
答え2
The Description and Examples sections of man man
are a great help in understanding how man
pages are organized and how to use them.
In general, I find the Examples, See Also and Files sections of many man
pages to be very useful since they give clues where to look next when you're trying to track down something that may be obscure.
If your pager is less
you can set the LESS_TERMCAP_*
variables to show color in man
pages. Here are mine:
export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green
export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan
export LESS_TERMCAP_me=$(tput sgr0)
export LESS_TERMCAP_so=$(tput bold; tput setaf 3; tput setab 4) # yellow on blue
export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) # white
export LESS_TERMCAP_ue=$(tput rmul; tput sgr0)
export LESS_TERMCAP_mr=$(tput rev)
export LESS_TERMCAP_mh=$(tput dim)
export LESS_TERMCAP_ZN=$(tput ssubm)
export LESS_TERMCAP_ZV=$(tput rsubm)
export LESS_TERMCAP_ZO=$(tput ssupm)
export LESS_TERMCAP_ZW=$(tput rsupm)
Don't forget that the info
files often have more detail and are navigable (have a form of hyperlink).
答え3
If you are using konqueror then man pages can be browsed in the browser itself. Just put man:/command_name to view man page
e.g. man:/ls
Alternatively there's vim plugin available to view man pages with syntax highlighting in vim http://vim.wikia.com/wiki/View_man_pages_in_Vim
答え4
I browse them with vim and syntax highlighting