Linux系统帮助信息查看工具汇总
作者:互联网
1.man命令的使用:
man命令可以提供命令行工具、系统源代码文件、标准库函数的帮助信息,举例如下:
1 [root@localhost nsp]# man gdb 2 GDB(1) GNU Development Tools GDB(1) 3 4 NAME 5 gdb - The GNU Debugger 6 7 SYNOPSIS 8 gdb [-help] [-nh] [-nx] [-q] [-batch] [-cd=dir] [-f] [-b bps] 9 [-tty=dev] [-s symfile] [-e prog] [-se prog] [-c core] [-p procID] 10 [-x cmds] [-d dir] [prog|prog procID|prog core] 11 12 DESCRIPTION 13 The purpose of a debugger such as GDB is to allow you to see what is going on "inside" another program while it executes -- or what 14 another program was doing at the moment it cra 15 16 [root@localhost nsp]# 17 [root@localhost nsp]# man stddef.h 18 <stddef.h>(0P) POSIX Programmer's Manual <stddef.h>(0P) 19 20 NAME 21 stddef.h - standard type definitions 22 23 SYNOPSIS 24 #include <stddef.h> 25 26 DESCRIPTION 27 The <stddef.h> header shall define the following macros: 28 29 NULL Null pointer constant. 30 31 offsetof(type, member-designator) 32 33 34 [root@localhost nsp]# 35 [root@localhost nsp]# man offsetof 36 OFFSETOF(3) Linux Programmer's Manual OFFSETOF(3) 37 38 NAME 39 offsetof - offset of a structure member 40 41 SYNOPSIS 42 #in
2.help命令的使用:
可以查询命令行的帮助信息:
1 [root@localhost nsp]# gcc --help 2 用法:gcc [选项] 文件... 3 选项: 4 -pass-exit-codes 在某一阶段退出时返回最高的错误码 5 --help 显示此帮助说明 6 --target-help 显示目标机器特定的命令行选项 7 --help={common|optimizers|par 8 9 10 [root@localhost nsp]# grep -h 11 用法: grep [选项]... PATTERN [FILE]... 12 试用‘grep --help’来获得更多信息。 13 [root@localhost nsp]#
3.info命令的使用:
info命令可以提供命令行工具、系统源代码文件、标准库函数的帮助信息,举例如下:
1 [root@localhost nsp]# info ls 2 File: coreutils.info, Node: ls invocation, Next: dir invocation, Up: Directory listing 3 4 10.1 'ls': List directory contents 5 ================================== 6 7 8 9 [root@localhost nsp]# info stdio.h 10 File: *manpages*, Node: stdio.h, Up: (dir) 11 12 <stdio.h>(0P) POSIX Programmer's Manual <stdio.h>(0P) 13 14 15 16 NAME 17 stdio.h - standard buffered input/output 18 19 SYNOPSIS 20 21 22 [root@localhost nsp]# 23 [root@localhost nsp]# info offsetof 24 File: libc.info, Node: Structure Measurement, Prev: Floating Type Macros, Up: Data Type Measurements 25 26 A.5.4 Structure Field Offset Measurement 27 ---------------------------------------- 28 29 You can use 'offsetof' to measure the location within a structure type 30 of a particular structure member. 31 32 -- Macro: si
4.whereis命令的使用:
whereis命令可以查询系统命令、系统文件所在的位置。
1 [root@localhost nsp]# whereis gdb 2 gdb: /usr/bin/gdb /usr/share/gdb /usr/share/man/man1/gdb.1.gz 3 [root@localhost nsp]#
5.locate命令的使用:
locate命令可以快速定位文件的位置,第一次安装后,先运行updatedb命令,更新缓存信息,否则
会提示查找不到locatedb文件的提示信息。
1 [root@localhost nsp]# 2 [root@localhost nsp]# locate flow_table.c 3 /home/sl/code/dpipro/eu/flow/flow_table.c 4 /home/sl/code/dpipro/nsp/flow/flow_table.c 5 /home/sl/code/dpipro/restore/flow/flow_table.c 6 /home/sl/code/nsppro/nsp/flow/flow_table.c 7 /home/sl/prog/sine/bsc/flow/source/flow_table.c 8 /home/sl/tool/trex-core-master/src/nat_check_flow_table.cpp 9 /home/sl/tool/trex-core-master/src/44bsd/flow_table.cpp 10 [root@localhost nsp]#
6.whatis命令的使用:
whatis命令可以提供命令行工具、系统源代码文件、标准库函数的帮助信息,举例如下:
1 [root@localhost nsp]# whatis gcc 2 gcc (1) - GNU project C and C++ compiler 3 [root@localhost nsp]# whatis stddef.h 4 stddef.h (0p) - standard type definitions 5 [root@localhost nsp]# whatis offsetof 6 offsetof (3) - offset of a structure member 7 [root@localhost nsp]# whatis main 8 main:没有 appropriate。 9 [root@localhost nsp]# whatis open 10 open (3pm) - perl pragma to set default PerlIO layers for input and output 11 open (n) - Open a file-based or command pipeline channel 12 open (2) - open and possibly create a file or device 13 open (3p) - open a file 14 [root@localhost nsp]#
标签:help,查看,flow,汇总,Linux,nsp,table,root,localhost 来源: https://www.cnblogs.com/alog9/p/12073105.html