Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do programs in Unix-like environments have numbers after their name? [duplicate]

Tags:

For example, when I run man ioctl the page says IOCTL(2) at the top. What does that mean? Is there an IOCTL(1)? And how does one navigate between these?

like image 600
Abdullah Jibaly Avatar asked Feb 25 '09 20:02

Abdullah Jibaly


People also ask

What does the number after a man page mean?

It's the section that the man page for the command is assigned to. These are split as. General commands. System calls. C library functions.

What is the name of the Unix command that performs comparisons on integers strings and files?

Grep is an essential Linux and Unix command. It is used to search text and strings in a given file. In other words, grep command searches the given file for lines containing a match to the given strings or words.

What does $_ mean in bash?

$_ (dollar underscore) is another special bash parameter and used to reference the absolute file name of the shell or bash script which is being executed as specified in the argument list. This bash parameter is also used to hold the name of mail file while checking emails.

What is text manipulation in Linux?

grep is a Linux text-manipulating utility that searches for a string of characters or patterns known as regular expressions in a file or text. The grep tool belongs to the family of utilities that include egrep, fgrep, and grep, among which fgrep is the fastest of all, while grep is the easiest.


2 Answers

It's the man page section. From memory, section 1 is user programs, 2 is system calls, and 3 is standard C library calls, and 5 is file formats.

Wikipedia has the full explanation here.

like image 197
Paul Tomblin Avatar answered Sep 17 '22 16:09

Paul Tomblin


That's the man page section number. For example

 man printf 

(should) Give you section 1, printf the bash command, while

 man 3 printf 

gives you the C function printf.

like image 30
eduffy Avatar answered Sep 19 '22 16:09

eduffy