Remember the different Linux manual sections.
man 1 -> user commands
man 2 -> Linux system calls
man 3 -> C library functions (but not necessarily C Standard Library functions)
man 4 -> special files
man 5 -> file formats
man 8 -> administration and privileged commands
Note: These are the current manual sections. Our textbook uses an
older numbering for manual sections. For example, the book considers
Section 4 to be file formats, but that is now Section 5.
You can get an introduction to section n with the command
$ man n intro
--------------------------------------------------------------------------
Section 4.2
Read about the -R option to ls.
man 1 ls
--------------------------------------------------------------------------
Section 4.3
Read about the -i option to ls.
man 1 ls
dirent.h
/usr/include/dirent.h
/usr/include/bits/dirent.h
struct dirent
{
__ino64_t d_ino;
unsigned char d_type;
unsigned char __d_unused1[3];
__uint32_t __d_internal1;
char d_name[NAME_MAX + 1];
};
--------------------------------------------------------------------------
Section 4.4
man 1 mkdir
man 2 mkdir
man 1 rmdir
man 2 rmdir
man 1 rm
man 1 unlink
man 2 unlink
man 1 ln
man 2 link
man 1 mv
man 1 rename
man 2 rename
cd
man 2 chdir
--------------------------------------------------------------------------
Section 4.5
The real version of the command pwd is written in terms of the system call getcwd().
man 1 pwd
man 3 getcwd
--------------------------------------------------------------------------
Section 4.6
man 1 mountpoint
man 8 mount
man 2 mount
man 1 ln -s
man 7 symlink
man 2 symlink
man 2 readlink
man 2 lstat