According to man man, you can optionally give the section of the manual before the page. Section 1 is user commands, 2 system calls and 3 library functions, so:
man 1 printf
man 3 printf
give the shell command and the C library function printf, respectively.
Answer from thiton on Stack OverflowVideos
According to man man, you can optionally give the section of the manual before the page. Section 1 is user commands, 2 system calls and 3 library functions, so:
man 1 printf
man 3 printf
give the shell command and the C library function printf, respectively.
mknod() the C function lives in section 2 of the man pages. You can view it using:
man -s2 mknod
In general things like this are likely to live in either section 2 (system calls) or section 3 (library calls)
You can also get information beside man gcc (you have to change the order of your cmd)
by using
info gcc
To get a short command description type
gcc --help
For a full manual install the gcc documentation by
gccv=$(gcc --version | awk '/gcc /{print $NF}' | cut -c 1)
sudo apt install gcc-$gccv-doc
and then type
xdg-open /usr/share/doc/gcc-$gccv-doc/gcc.html
to read the gcc manual in your browser.
To view manual use this commands order:
man gcc
gcc isn't installed anymore by Xcode, it really installs clang and calls it gcc
usxxplayegm1:~ grady$ which gcc
/usr/bin/gcc
usxxplayegm1:~ grady$ /usr/bin/gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.0.2
Thread model: posix
you need man clang
I thought it was a symlink, but ls -l doesn't list it as a symlink, so either it is a hard link or some other sort of trickery.
This may be old and doesn't quite answers your concrete question, but I found myself in the same problem with Kali Linux and I solved it with this command, maybe is useful for someone:
apt install gcc-doc