Linux info命令

Linux info命令:阅读info格式的文件

Linux info命令 功能描述

使用info命令可以阅读info格式的文件,用来查看帮助信息。info文档可以支持链接跳转功能。info文档都存放在/usr/share/info目录中,该目录提供了整个软件包项目的帮助文档。

Linux info命令 语法

info [选项] [菜单项目]

选项含义:命令中各选项的含义如下表所示。

Linux info命令 语法

在使用info命令阅读info格式的文件时可以使用下表所示的子命令。

Linux info命令 语法

Linux info命令 示例

查看ls命令的info文档。

[root@rhel ~]# info ls
File: coreutils.info, Node: ls invocation, Next: dir invocation, Up: Directory listing
10.1 'ls': List directory contents
==================================
The 'ls' program lists information about files (of any type, including
directories). Options and file arguments can be intermixed
arbitrarily, as usual.
  For non-option command-line arguments that are directories, by
default 'ls' lists the contents of directories, not recursively, and
omitting files with names beginning with'.'. For other non-option
arguments, by default'ls'lists just the file name. If no non-option
argument is specified, 'ls' operates on the current directory, acting
as if it had been invoked with a single argument of '.'.
  By default, the output is sorted alphabetically, according to the
locale settings in effect.(1) If standard output is a terminal, the
output is in columns (sorted vertically) and control characters are
output as question marks; otherwise, the output is listed one per line
and control characters are output as-is.
  Because 'ls' is such a fundamental program, it has accumulated many
options over the years. They are described in the subsections below;
within each section, options are listed alphabetically (ignoring case).
The division of options into the subsections is not absolute, since some
options affect more than one aspect of 'ls''s operation.
  Exit status:
    0 success
1 minor problems (e.g., failure to access a file or directory not
    specified as a command line argument. This happens when listing a
    directory in which entries are actively being removed or renamed.)
    2 serious trouble (e.g., memory exhausted, invalid option, failure
    to access a file or directory specified as a command line argument
    or a directory loop)
--zz-Info: (coreutils.info.gz)ls invocation, 57 lines --Top------------------------------------------------------------------
Welcome to Info version 4.13. Type h for help, m for menu item.

显示ls命令info文档的物理位置。

[root@rhel ~]# info -w ls
/usr/share/info/coreutils.info.gz

Camera课程

Python教程

Java教程

Web教程

数据库教程

图形图像教程

办公软件教程

Linux教程

计算机教程

大数据教程

开发工具教程