自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Linux下man命令的使用技巧

系統(tǒng) Linux
在Linux的shell下我經(jīng)常要使用man命令來查看一些不熟悉的命令的使用方法。最經(jīng)在shell下編程的時候,發(fā)現(xiàn)一些c和c++中的庫函數(shù)不清楚,我都跑去網(wǎng)上搜索了。一不小心,我發(fā)現(xiàn),原來man還可以用來查詢系統(tǒng)庫文件中的一些函數(shù)定義和使用方法。

在Linux的shell下我經(jīng)常要使用man命令來查看一些不熟悉的命令的使用方法。最經(jīng)在shell下編程的時候,發(fā)現(xiàn)一些c和c++中的庫函數(shù)不清楚,我都跑去網(wǎng)上搜索了。一不小心,我發(fā)現(xiàn),原來man還可以用來查詢系統(tǒng)庫文件中的一些函數(shù)定義和使用方法。

man就是manual的縮寫,用來查看系統(tǒng)中自帶的各種參考手冊,但是手冊頁分為好幾個部分,如下所示:

1   Executable programs or shell commands

2   System calls (functions provided by the kernel)

3   Library calls (functions within program libraries)

4   Special files (usually found in /dev)

5   File formats and conventions eg /etc/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]

在shell中輸入 man+數(shù)字+命令/函數(shù) 即可以查到相關的命令和函數(shù)。若不加數(shù)字,那man命令默認從數(shù)字較小的手冊中尋找相關命令和函數(shù)。

例如,本來是想尋找c標準庫中的rand()函數(shù),直接使用man rand得到的是一個rand命令的手冊,直接用來產(chǎn)生一個隨機數(shù),這個內(nèi)容在手冊section 1中。如果使用man 3 rand就可以得到自己想要的庫函數(shù)中rand()的用法了。

【編輯推薦】

  1. 講解Linux基礎命令之:man、reboot
  2. linux大掃盲:linux之Tar命令常用參數(shù)
  3. linux定時器的使用
責任編輯:趙寧寧 來源: chinaitlab
相關推薦

2010-03-11 13:52:02

Linux MAN

2019-12-04 12:28:24

TOP命令Linux

2010-03-05 15:20:25

Linux man命令

2013-12-26 16:55:56

manman命令

2024-03-18 11:24:54

2023-12-27 14:08:00

LinuxTop命令工具

2020-11-19 09:35:56

Linuxscreen命令

2009-08-17 08:42:48

LinuxScreen命令使用技巧

2010-02-03 14:57:18

Linux shell

2010-01-22 10:51:54

svn命令linux

2010-04-12 09:07:09

Make命令

2024-03-26 15:21:43

2009-08-03 12:21:03

linux at命令linux at命令詳定時關機

2018-09-12 21:44:32

Linux命令行操作系統(tǒng)

2009-10-22 16:00:37

Linux基本命令

2022-03-25 14:53:32

Linuxvmstat 命令

2014-08-11 09:45:33

Linux小技巧

2010-03-11 09:50:46

Linux VI命令

2009-08-21 17:17:10

VMware work

2009-07-31 17:51:42

linux vi命令詳linux vi命令編輯器
點贊
收藏

51CTO技術棧公眾號