linux下的帮助方法有三种:help、man、info
查看ls命令的用法,可以执行:
ls --help
help只能查看某个命令的用法,而man手册既能查看命令的用法,也可以查看函数的详细介绍等信息。并且man手册包含9大分类:
#1 Executable programs or shell commands // 命令
#2 System calls (functions provided by the kernel) // 系统调用,比如 man 2 open
#3 Library calls (functions within program libraries) // 函数库调用
#4 Special files (usually found in /dev) // 特殊文件, 比如 man 4 tty
#5 File formats and conventions eg /etc/passwd // 文件格式和约定, 比如 man 5 passwd
#6 Games // 游戏
#7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7) //杂项
#8 System administration commands (usually only for root) // 系统管理命令
#9 Kernel routines [Non standard] // 内核例程
info虽然更全面,但是没有man手册方便,常用的还是man手册。