man -w
man ファイルが同名でいっぱい合った時に、どのmanpage ファイルを見ているのか、調べたい
man -w ssh
man がいっぱいある時に便利
たとえば、homebrew でsshを入れているので、man を探すと、これだけヒットする。ssh(1) が複数あることになってる
ssh(1) - OpenSSH SSH client (remote login program) ssh-add(1) - adds private key identities to the authentication agent ssh-agent(1) - authentication agent ssh-copy-id(1) - use locally available keys to authorise logins on a remote machine ssh-keygen(1) - authentication key generation, management and conversion ssh-keyscan(1) - gather ssh public keys ssh-keysign(8) - ssh helper program for host-based authentication ssh-pkcs11-helper(8) - ssh-agent helper program for PKCS#11 support ssh_config(5) - OpenSSH SSH client configuration files sshd(8) - OpenSSH SSH daemon sshd_config(5) - OpenSSH SSH daemon configuration file CURLOPT_SSH_AUTH_TYPES(3) - set desired auth types for SFTP and SCP CURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3) - checksum of SSH server public key CURLOPT_SSH_KEYDATA(3) - pointer to apss to the SSH key callback CURLOPT_SSH_KEYFUNCTION(3) - callback for known host matching logic CURLOPT_SSH_KNOWNHOSTS(3) - file name holding the SSH known hosts CURLOPT_SSH_PRIVATE_KEYFILE(3) - set private key file for SSH auth CURLOPT_SSH_PUBLIC_KEYFILE(3) - set public key file for SSH auth Net::DNS::RR::SSHFP(3pm) - DNS SSHFP resource record Tcl_NewObj(3tcl), Tcl_DuplicateObj(3tcl), Tcl_IncrRefCount(3tcl), Tcl_DecrRefCount(3tcl), Tcl_IsShared(3tcl), Tcl_InvalidateStringRep(3tcl) - manipulate Tcl objects crosshair(n) - Crosshairs for Tk canvas glIsShader(3G) - Determines if a name corresponds to a shader object ssh(1) - OpenSSH SSH client (remote login program) ssh-add(1) - adds private key identities to the authentication agent ssh-agent(1) - authentication agent ssh-keygen(1) - authentication key generation, management and conversion ssh-keyscan(1) - gather ssh public keys ssh-keysign(8) - ssh helper program for host-based authentication ssh-pkcs11-helper(8) - ssh-agent helper program for PKCS#11 support ssh_config(5) - OpenSSH SSH client configuration files sshd(8) - OpenSSH SSH daemon sshd-keygen-wrapper(8), ssh-keygen(8) - authentication key generation, management and conversion sshd_config(5) - OpenSSH SSH daemon configuration file upsshutdown(8) - UPS emergency low power shutdown script git-shell(1) - Restricted login shell for Git-only SSH access
おおすぎ!sshd 関連で2個もあるじゃん。
man ssh でどのmanpageが開かれるかは -w オプションで見られる。
takuya@:~/Desktop$ man -w ssh /usr/local/share/man/man1/ssh.1