man
查看命令的帮助信息
man cd
help
查看内置的命令帮助,一般用man查不到的就用help参数来查
举个栗子
man kubectl
没有 kubectl 的手册页条目
kubectl --help
kubectl controls the Kubernetes cluster manager.
Find more information at: https://kubernetes.io/docs/reference/kubectl/overview/
kubrctl是k8s集群里的管理命令,是没有单独的命令手册的,想要查看kubectl的用法就要通过–help参数。
info
查询信息。
info与man的用途基本上差不多,都是用来查询命令的用法。但是与man一口气输出一堆信息不同的是,info会将文件数据拆成一个一个的段落,每个段落用自己的页面来撰写, 并且在各个页面中还有类似网页的超链接来跳到各不同的页面中,每个独立的页面也被称为一个节点(node)。所以,其实info就是文本模式的网页显示数据。
举个栗子
用info info命令看一下info的用法
File: info.info, Node: Top, Next: Getting Started, Up: (dir)
Info: An Introduction
*********************
The GNU Project distributes most of its on-line manuals in the "Info
format", which you read using an "Info reader". You are probably using
an Info reader to read this now.
There are two primary Info readers: 'info', a stand-alone program
designed just to read Info files (*note What is Info?: (info-stnd)Top.),
and the 'info' package in GNU Emacs, a general-purpose editor. At
present, only the Emacs reader supports using a mouse.
If you are new to the Info reader and want to learn how to use it,
type the command 'h' now. It brings you to a programmed instruction
sequence.
To read about advanced Info commands, type 'n' twice. This brings
you to 'Advanced Info Commands', skipping over the 'Getting Started'
chapter.
This file describes how to use Info, the on-line, menu-driven GNU
--zz-Info: (info.info.gz)Top, 52 lines --Top--------------------------------------------------------------
Welcome to Info version 5.1. Type h for help, m for menu item.
注意看第一行,这一行包括非常多的信息
File: info.info, Node: Top, Next: Getting Started, Up: (dir)
- File:代表现在屏幕输出的数据来自info.info文件
- Node:当前页面属于Top节点,info.info内包含很多信息,也就是很多节点,而Top仅仅是info.info文件内的一个节点而已
- Next::下一个节点是Getting Started,直接按N到下个节点
- Up:回到上一层的节点总览,就好像目录一样,也可以直接按U
- Prev:前一个节点,这里并没有,因为Top是info.info的第一个节点