2007-05-22 23:46:32 +00:00
|
|
|
.\" (C) Copyright 1992-1999 Rickard E. Faith and David A. Wheeler
|
|
|
|
.\" (faith@cs.unc.edu and dwheeler@ida.org)
|
2007-09-20 06:52:22 +00:00
|
|
|
.\" and (C) Copyright 2007 Michael Kerrisk <mtk.manpages@gmail.com>
|
2007-05-22 23:46:32 +00:00
|
|
|
.\"
|
intro.1, _exit.2, access.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bind.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, close.2, connect.2, delete_module.2, dup.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, fork.2, fstatat.2, fsync.2, futimesat.2, get_robust_list.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getpagesize.2, getpid.2, getresuid.2, getrlimit.2, getrusage.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, idle.2, init_module.2, intro.2, iopl.2, kcmp.2, kexec_load.2, kill.2, link.2, linkat.2, llseek.2, lookup_dcookie.2, madvise.2, mincore.2, mkdirat.2, mknodat.2, mmap.2, mmap2.2, mount.2, mprotect.2, mq_getsetattr.2, msgctl.2, msgget.2, msgop.2, msync.2, nice.2, open.2, openat.2, pause.2, perfmonctl.2, personality.2, pipe.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, quotactl.2, read.2, readahead.2, readdir.2, readlinkat.2, readv.2, reboot.2, recvmmsg.2, remap_file_pages.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, sendmmsg.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setresuid.2, setuid.2, setup.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, signal.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, splice.2, stat.2, statfs.2, stime.2, subpage_prot.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysfs.2, syslog.2, tee.2, time.2, timer_create.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, times.2, tkill.2, umask.2, umount.2, uname.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, abort.3, abs.3, acos.3, acosh.3, adjtime.3, aio_init.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, byteorder.3, bzero.3, catgets.3, catopen.3, cbrt.3, ceil.3, clearenv.3, clock.3, clock_getcpuclockid.3, closedir.3, confstr.3, copysign.3, cos.3, cosh.3, ctermid.3, ctime.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, end.3, endian.3, erf.3, erfc.3, ether_aton.3, euidaccess.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fcloseall.3, fexecve.3, ffs.3, fgetgrent.3, fgetpwent.3, finite.3, flockfile.3, floor.3, fmod.3, fnmatch.3, fopencookie.3, fpathconf.3, fpurge.3, frexp.3, fseeko.3, ftok.3, futimes.3, gcvt.3, get_nprocs_conf.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getifaddrs.3, getipnodebyname.3, getline.3, getlogin.3, getmntent.3, getnetent.3, getnetent_r.3, getopt.3, getprotoent.3, getprotoent_r.3, getpw.3, getpwent.3, getpwnam.3, getrpcent_r.3, gets.3, getservent.3, getservent_r.3, getumask.3, getusershell.3, getutmp.3, getw.3, glob.3, gnu_get_libc_version.3, gsignal.3, hypot.3, if_nameindex.3, if_nametoindex.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, j0.3, ldexp.3, localeconv.3, log.3, log10.3, log1p.3, log2.3, logb.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, mallinfo.3, malloc.3, malloc_get_state.3, malloc_info.3, malloc_stats.3, malloc_trim.3, malloc_usable_size.3, mallopt.3, matherr.3, mcheck.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, on_exit.3, opendir.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, profil.3, psignal.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_cleanup_push_defer_np.3, pthread_create.3, pthread_detach.3, pthread_equal.3, pthread_exit.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_join.3, pthread_kill.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_setschedprio.3, pthread_sigmask.3, pthread_sigqueue.3, pthread_testcancel.3, pthread_tryjoin_np.3, pthread_yield.3, putenv.3, putpwent.3, puts.3, qecvt.3, qsort.3, raise.3, rand.3, random.3, random_r.3, re_comp.3, readdir.3, realpath.3, regex.3, remainder.3, remove.3, resolver.3, rewinddir.3, rint.3, round.3, scalb.3, scalbln.3, scandir.3, sched_getcpu.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setenv.3, setlocale.3, setlogmask.3, shm_open.3, siginterrupt.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sigwait.3, sin.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdio_ext.3, stpcpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfry.3, strftime.3, string.3, strlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, trunc.3, tsearch.3, ttyslot.3, tzset.3, ulimit.3, undocumented.3, unlocked_stdio.3, usleep.3, y0.3, cpuid.4, full.4, initrd.4, mouse.4, msr.4, sd.4, st.4, acct.5, core.5, services.5, slabinfo.5, aio.7, capabilities.7, credentials.7, feature_test_macros.7, hier.7, inotify.7, libc.7, locale.7, man-pages.7, man.7, math_error.7, mq_overview.7, numa.7, path_resolution.7, pipe.7, pthreads.7, pty.7, rtld-audit.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, suffixes.7, svipc.7, termio.7, time.7, udplite.7, units.7, uri.7, sln.8: s/LICENSE_START(verbatim)/LICENSE_START(VERBATIM)/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:29:01 +00:00
|
|
|
.\" %%%LICENSE_START(VERBATIM)
|
2007-05-22 23:46:32 +00:00
|
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
|
|
.\" preserved on all copies.
|
|
|
|
.\"
|
|
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
|
|
.\" permission notice identical to this one.
|
|
|
|
.\"
|
|
|
|
.\" Since the Linux kernel and libraries are constantly changing, this
|
|
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
|
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
|
|
.\" have taken the same level of care in the production of this manual,
|
|
|
|
.\" which is licensed free of charge, as they might when working
|
|
|
|
.\" professionally.
|
|
|
|
.\"
|
|
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
intro.1, _exit.2, access.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bind.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, close.2, connect.2, delete_module.2, dup.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, fork.2, fstatat.2, fsync.2, futimesat.2, get_robust_list.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getpagesize.2, getpid.2, getresuid.2, getrlimit.2, getrusage.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, idle.2, init_module.2, intro.2, iopl.2, kcmp.2, kexec_load.2, kill.2, link.2, linkat.2, llseek.2, lookup_dcookie.2, madvise.2, mincore.2, mkdirat.2, mknodat.2, mmap.2, mmap2.2, mount.2, mprotect.2, mq_getsetattr.2, msgctl.2, msgget.2, msgop.2, msync.2, nice.2, open.2, openat.2, pause.2, perfmonctl.2, personality.2, pipe.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, quotactl.2, read.2, readahead.2, readdir.2, readlinkat.2, readv.2, reboot.2, recvmmsg.2, remap_file_pages.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, sendmmsg.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setresuid.2, setuid.2, setup.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, signal.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, splice.2, stat.2, statfs.2, stime.2, subpage_prot.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysfs.2, syslog.2, tee.2, time.2, timer_create.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, times.2, tkill.2, umask.2, umount.2, uname.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, abort.3, abs.3, acos.3, acosh.3, adjtime.3, aio_init.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, byteorder.3, bzero.3, catgets.3, catopen.3, cbrt.3, ceil.3, clearenv.3, clock.3, clock_getcpuclockid.3, closedir.3, confstr.3, copysign.3, cos.3, cosh.3, ctermid.3, ctime.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, end.3, endian.3, erf.3, erfc.3, ether_aton.3, euidaccess.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fcloseall.3, fexecve.3, ffs.3, fgetgrent.3, fgetpwent.3, finite.3, flockfile.3, floor.3, fmod.3, fnmatch.3, fopencookie.3, fpathconf.3, fpurge.3, frexp.3, fseeko.3, ftok.3, futimes.3, gcvt.3, get_nprocs_conf.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getifaddrs.3, getipnodebyname.3, getline.3, getlogin.3, getmntent.3, getnetent.3, getnetent_r.3, getopt.3, getprotoent.3, getprotoent_r.3, getpw.3, getpwent.3, getpwnam.3, getrpcent_r.3, gets.3, getservent.3, getservent_r.3, getumask.3, getusershell.3, getutmp.3, getw.3, glob.3, gnu_get_libc_version.3, gsignal.3, hypot.3, if_nameindex.3, if_nametoindex.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, j0.3, ldexp.3, localeconv.3, log.3, log10.3, log1p.3, log2.3, logb.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, mallinfo.3, malloc.3, malloc_get_state.3, malloc_info.3, malloc_stats.3, malloc_trim.3, malloc_usable_size.3, mallopt.3, matherr.3, mcheck.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, on_exit.3, opendir.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, profil.3, psignal.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_cleanup_push_defer_np.3, pthread_create.3, pthread_detach.3, pthread_equal.3, pthread_exit.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_join.3, pthread_kill.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_setschedprio.3, pthread_sigmask.3, pthread_sigqueue.3, pthread_testcancel.3, pthread_tryjoin_np.3, pthread_yield.3, putenv.3, putpwent.3, puts.3, qecvt.3, qsort.3, raise.3, rand.3, random.3, random_r.3, re_comp.3, readdir.3, realpath.3, regex.3, remainder.3, remove.3, resolver.3, rewinddir.3, rint.3, round.3, scalb.3, scalbln.3, scandir.3, sched_getcpu.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setenv.3, setlocale.3, setlogmask.3, shm_open.3, siginterrupt.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sigwait.3, sin.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdio_ext.3, stpcpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfry.3, strftime.3, string.3, strlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, trunc.3, tsearch.3, ttyslot.3, tzset.3, ulimit.3, undocumented.3, unlocked_stdio.3, usleep.3, y0.3, cpuid.4, full.4, initrd.4, mouse.4, msr.4, sd.4, st.4, acct.5, core.5, services.5, slabinfo.5, aio.7, capabilities.7, credentials.7, feature_test_macros.7, hier.7, inotify.7, libc.7, locale.7, man-pages.7, man.7, math_error.7, mq_overview.7, numa.7, path_resolution.7, pipe.7, pthreads.7, pty.7, rtld-audit.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, suffixes.7, svipc.7, termio.7, time.7, udplite.7, units.7, uri.7, sln.8: Global fix: Add LICENSE_START(verbatim)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:28:40 +00:00
|
|
|
.\" %%%LICENSE_END
|
2007-06-21 22:55:04 +00:00
|
|
|
.\"
|
|
|
|
.\" 2007-05-30 created by mtk, using text from old man.7 plus
|
2007-05-23 06:16:43 +00:00
|
|
|
.\" rewrites and additional text.
|
2007-05-22 23:46:32 +00:00
|
|
|
.\"
|
2013-02-24 14:16:29 +00:00
|
|
|
.TH MAN-PAGES 7 2013-02-24 "Linux" "Linux Programmer's Manual"
|
2007-05-22 23:46:32 +00:00
|
|
|
.SH NAME
|
|
|
|
man-pages \- conventions for writing Linux man pages
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B man
|
|
|
|
.RI [ section ]
|
|
|
|
.I title
|
|
|
|
.SH DESCRIPTION
|
|
|
|
This page describes the conventions that should be employed
|
|
|
|
when writing man pages for the Linux \fIman-pages\fP project,
|
2013-02-18 15:05:06 +00:00
|
|
|
which documents the user-space API provided by the Linux kernel
|
|
|
|
and the GNU C library.
|
|
|
|
The project thus provides most of the pages in Section 2,
|
2013-03-05 17:22:04 +00:00
|
|
|
as well as many of the pages that appear
|
2013-02-18 15:05:06 +00:00
|
|
|
in Sections 3, 4, 5, and 7 of the man pages on a Linux system.
|
2007-05-22 23:46:32 +00:00
|
|
|
The conventions described on this page may also be useful
|
|
|
|
for authors writing man pages for other projects.
|
intro.1, time.1, _syscall.2, accept.2, brk.2, capget.2, faccessat.2, futimesat.2, gethostname.2, intro.2, ioprio_set.2, kill.2, madvise.2, mlock.2, mount.2, msgget.2, perf_event_open.2, poll.2, readv.2, sched_rr_get_interval.2, sched_setscheduler.2, select.2, select_tut.2, shmget.2, stat.2, timer_create.2, ustat.2, vfork.2, wait.2, alloca.3, atexit.3, catopen.3, crypt.3, dbopen.3, fenv.3, fopen.3, getaddrinfo_a.3, gethostbyname.3, getutent.3, intro.3, login.3, mallopt.3, queue.3, regex.3, sigpause.3, sigsetops.3, stdio.3, strftime.3, strptime.3, sysconf.3, ttyslot.3, undocumented.3, cciss.4, console_codes.4, hpsa.4, initrd.4, intro.4, rtc.4, st.4, tty_ioctl.4, wavelan.4, acct.5, charmap.5, dir_colors.5, hosts.5, intro.5, termcap.5, utmp.5, intro.6, armscii-8.7, boot.7, bootparam.7, capabilities.7, cpuset.7, credentials.7, ddp.7, epoll.7, glob.7, intro.7, ip.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, man-pages.7, man.7, math_error.7, netlink.7, numa.7, packet.7, path_resolution.7, pipe.7, pthreads.7, raw.7, rtnetlink.7, signal.7, socket.7, spufs.7, svipc.7, tcp.7, time.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, utf-8.7, x25.7, intro.8: Global fix: use consistent capitalization in .SS headings
Capitalization in .SS sections across pages (and sometimes even
within a single page) is wildly inconsistent. Make it consistent.
Capitalize first word in heading, but otherwise use lower case,
except where English usage (e.g., proper nouns) or programming
language requirements (e.g., identifier names) dictate otherwise.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 14:08:38 +00:00
|
|
|
.SS Sections of the manual pages
|
2007-05-22 23:46:32 +00:00
|
|
|
.PP
|
|
|
|
The manual Sections are traditionally defined as follows:
|
|
|
|
.TP 10
|
|
|
|
.B 1 Commands (Programs)
|
|
|
|
Those commands that can be executed by the user from within
|
|
|
|
a shell.
|
|
|
|
.TP
|
|
|
|
.B 2 System calls
|
|
|
|
Those functions which must be performed by the kernel.
|
|
|
|
.TP
|
|
|
|
.B 3 Library calls
|
|
|
|
Most of the
|
|
|
|
.I libc
|
|
|
|
functions.
|
|
|
|
.TP
|
|
|
|
.B 4 Special files (devices)
|
|
|
|
Files found in
|
|
|
|
.IR /dev .
|
|
|
|
.TP
|
|
|
|
.B 5 File formats and conventions
|
|
|
|
The format for
|
|
|
|
.I /etc/passwd
|
|
|
|
and other human-readable files.
|
|
|
|
.TP
|
|
|
|
.B 6 Games
|
|
|
|
.TP
|
2013-01-17 19:49:21 +00:00
|
|
|
.B 7 Overview, conventions, and miscellaneous
|
2007-05-22 23:46:32 +00:00
|
|
|
Overviews of various topics, conventions and protocols,
|
|
|
|
character set standards, and miscellaneous other things.
|
|
|
|
.TP
|
|
|
|
.B 8 System management commands
|
|
|
|
Commands like
|
|
|
|
.BR mount (8),
|
|
|
|
many of which only root can execute.
|
|
|
|
.\" .TP
|
|
|
|
.\" .B 9 Kernel routines
|
|
|
|
.\" This is an obsolete manual section.
|
|
|
|
.\" Once it was thought a good idea to document the Linux kernel here,
|
|
|
|
.\" but in fact very little has been documented, and the documentation
|
|
|
|
.\" that exists is outdated already.
|
|
|
|
.\" There are better sources of
|
|
|
|
.\" information for kernel developers.
|
|
|
|
.SS Macro package
|
|
|
|
New manual pages should be marked up using the
|
2007-08-27 09:56:58 +00:00
|
|
|
.B groff an.tmac
|
2007-05-22 23:46:32 +00:00
|
|
|
package described in
|
|
|
|
.BR man (7).
|
2007-06-21 22:55:04 +00:00
|
|
|
This choice is mainly for consistency: the vast majority of
|
2007-05-22 23:46:32 +00:00
|
|
|
existing Linux manual pages are marked up using these macros.
|
|
|
|
.SS Conventions for source file layout
|
2007-06-21 22:55:04 +00:00
|
|
|
Please limit source code line length to no more than about 75 characters
|
2007-05-22 23:46:32 +00:00
|
|
|
wherever possible.
|
|
|
|
This helps avoid line-wrapping in some mail clients when patches are
|
|
|
|
submitted inline.
|
|
|
|
|
|
|
|
New sentences should be started on new lines.
|
|
|
|
This makes it easier to see the effect of patches,
|
|
|
|
which often operate at the level of individual sentences.
|
|
|
|
.SS Title line
|
|
|
|
The first command in a man page should be a \fBTH\fP command:
|
|
|
|
.RS
|
|
|
|
.sp
|
|
|
|
.B \&.TH
|
2007-09-20 16:26:31 +00:00
|
|
|
.I "title section date source manual"
|
2007-05-22 23:46:32 +00:00
|
|
|
.sp
|
|
|
|
.RE
|
|
|
|
where:
|
|
|
|
.RS
|
|
|
|
.TP 10
|
|
|
|
.I title
|
|
|
|
The title of the man page, written in all caps (e.g.,
|
|
|
|
.IR MAN-PAGES ).
|
|
|
|
.TP
|
|
|
|
.I section
|
|
|
|
The section number in which the man page should be placed (e.g.,
|
|
|
|
.IR 7 ).
|
|
|
|
.TP
|
|
|
|
.I date
|
intro.1, fork.2, futex.2, open.2, rename.2, select_tut.2, semop.2, spu_create.2, stat.2, netlink.3, random.3, scanf.3, shm_open.3, strftime.3, console.4, console_codes.4, sk98lin.4, st.4, bootparam.7, cpuset.7, credentials.7, man-pages.7, path_resolution.7, uri.7: Global fix: remove spaces around em-dash
Normal English typographical convention is not to have
spaces around em dashes.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2011-10-03 06:47:35 +00:00
|
|
|
The date of the last revision\(emremember to change this every time a
|
2007-05-23 06:16:43 +00:00
|
|
|
change is made to the man page,
|
|
|
|
since this is the most general way of doing version control.
|
2007-05-22 23:46:32 +00:00
|
|
|
Dates should be written in the form YYYY-MM-DD.
|
|
|
|
.TP
|
|
|
|
.I source
|
|
|
|
The source of the command, function, or system call.
|
2008-01-01 14:13:55 +00:00
|
|
|
|
2007-05-22 23:46:32 +00:00
|
|
|
For those few \fIman-pages\fP pages in Sections 1 and 8,
|
|
|
|
probably you just want to write
|
|
|
|
.IR GNU .
|
2008-01-01 14:13:55 +00:00
|
|
|
|
2007-05-22 23:46:32 +00:00
|
|
|
For system calls, just write
|
|
|
|
.IR "Linux" .
|
|
|
|
(An earlier practice was to write the version number
|
|
|
|
of the kernel from which the manual page was being written/checked.
|
|
|
|
However, this was never done consistently, and so was
|
|
|
|
probably worse than including no version number.
|
|
|
|
Henceforth, avoid including a version number.)
|
2008-01-01 14:13:55 +00:00
|
|
|
|
2007-06-21 22:55:04 +00:00
|
|
|
For library calls that are part of glibc or one of the
|
2007-05-22 23:46:32 +00:00
|
|
|
other common GNU libraries, just use
|
|
|
|
.IR "GNU C Library" ", " GNU ,
|
|
|
|
or an empty string.
|
2008-01-01 14:13:55 +00:00
|
|
|
|
2007-05-22 23:46:32 +00:00
|
|
|
For Section 4 pages, use
|
|
|
|
.IR "Linux" .
|
2008-01-01 14:13:55 +00:00
|
|
|
|
2007-05-22 23:46:32 +00:00
|
|
|
In cases of doubt, just write
|
|
|
|
.IR Linux ", or " GNU .
|
|
|
|
.TP
|
|
|
|
.I manual
|
2007-06-21 22:55:04 +00:00
|
|
|
The title of the manual (e.g., for Section 2 and 3 pages in
|
2007-05-22 23:46:32 +00:00
|
|
|
the \fIman-pages\fP package, use
|
|
|
|
.IR "Linux Programmer's Manual" ).
|
|
|
|
.RE
|
|
|
|
.SS Sections within a manual page
|
|
|
|
The list below shows conventional or suggested sections.
|
2007-06-21 22:55:04 +00:00
|
|
|
Most manual pages should include at least the
|
2007-05-22 23:46:32 +00:00
|
|
|
.B highlighted
|
|
|
|
sections.
|
2007-05-23 06:16:43 +00:00
|
|
|
Arrange a new manual page so that sections
|
2007-05-22 23:46:32 +00:00
|
|
|
are placed in the order shown in the list.
|
|
|
|
.in +0.5i
|
|
|
|
.nf
|
|
|
|
|
|
|
|
\fBNAME\fP
|
|
|
|
\fBSYNOPSIS\fP
|
2009-02-20 10:55:39 +00:00
|
|
|
CONFIGURATION [Normally only in Section 4]
|
2007-05-22 23:46:32 +00:00
|
|
|
\fBDESCRIPTION\fP
|
|
|
|
OPTIONS [Normally only in Sections 1, 8]
|
|
|
|
EXIT STATUS [Normally only in Sections 1, 8]
|
|
|
|
RETURN VALUE [Normally only in Sections 2, 3]
|
|
|
|
.\" May 07: Few current man pages have an ERROR HANDLING section,,,
|
|
|
|
.\" ERROR HANDLING,
|
|
|
|
ERRORS [Typically only in Sections 2, 3]
|
|
|
|
.\" May 07: Almost no current man pages have a USAGE section,,,
|
2007-06-21 22:55:04 +00:00
|
|
|
.\" USAGE,
|
2007-07-16 18:45:21 +00:00
|
|
|
.\" DIAGNOSTICS,
|
2007-05-22 23:46:32 +00:00
|
|
|
.\" May 07: Almost no current man pages have a SECURITY section,,,
|
|
|
|
.\" SECURITY,
|
|
|
|
ENVIRONMENT
|
|
|
|
FILES
|
|
|
|
VERSIONS [Normally only in Sections 2, 3]
|
|
|
|
CONFORMING TO
|
|
|
|
NOTES
|
|
|
|
BUGS
|
|
|
|
EXAMPLE
|
2007-06-08 12:02:17 +00:00
|
|
|
.\" AUTHORS sections are discouraged
|
|
|
|
.\" AUTHORS [Discouraged]
|
2007-05-22 23:46:32 +00:00
|
|
|
\fBSEE ALSO\fP
|
|
|
|
|
|
|
|
.fi
|
|
|
|
.in
|
|
|
|
.IR "Where a traditional heading would apply" ", " "please use it" ;
|
|
|
|
this kind of consistency can make the information easier to understand.
|
2007-06-21 22:55:04 +00:00
|
|
|
If you must, you can create your own
|
2007-05-22 23:46:32 +00:00
|
|
|
headings if they make things easier to understand (this can
|
|
|
|
be especially useful for pages in Sections 4 and 5).
|
|
|
|
However, before doing this, consider whether you could use the
|
|
|
|
traditional headings, with some subsections (\fI.SS\fP) within
|
|
|
|
those sections.
|
|
|
|
|
2007-06-21 22:55:04 +00:00
|
|
|
The following list elaborates on the contents of each of
|
2007-05-22 23:46:32 +00:00
|
|
|
the above sections.
|
|
|
|
.TP 14
|
|
|
|
.B NAME
|
|
|
|
The name of this manual page.
|
2007-06-21 22:55:04 +00:00
|
|
|
See
|
2007-05-22 23:46:32 +00:00
|
|
|
.BR man (7)
|
|
|
|
for important details of the line(s) that should follow the
|
2007-07-16 18:45:21 +00:00
|
|
|
\fB.SH NAME\fP command.
|
2012-10-21 06:34:21 +00:00
|
|
|
All words in this line (including the word immediately
|
|
|
|
following the "\\\-") should be in lowercase,
|
|
|
|
except where English or technical terminological convention
|
|
|
|
dictates otherwise.
|
2007-05-22 23:46:32 +00:00
|
|
|
.TP
|
|
|
|
.B SYNOPSIS
|
|
|
|
briefly describes the command or function's interface.
|
|
|
|
For commands, this shows the syntax of the command and its arguments
|
|
|
|
(including options);
|
2007-05-23 06:16:43 +00:00
|
|
|
boldface is used for as-is text and italics are used to
|
|
|
|
indicate replaceable arguments.
|
2007-05-22 23:46:32 +00:00
|
|
|
Brackets ([]) surround optional arguments, vertical bars (|)
|
|
|
|
separate choices, and ellipses (\&...) can be repeated.
|
|
|
|
For functions, it shows any required data declarations or
|
|
|
|
.B #include
|
|
|
|
directives, followed by the function declaration.
|
2007-07-03 10:45:00 +00:00
|
|
|
|
|
|
|
Where a feature test macro must be defined in order to obtain
|
|
|
|
the declaration of a function (or a variable) from a header file,
|
|
|
|
then the SYNOPSIS should indicate this, as described in
|
|
|
|
.BR feature_test_macros (7).
|
2007-07-03 06:52:50 +00:00
|
|
|
.\" FIXME . Say something here about compiler options
|
2007-05-22 23:46:32 +00:00
|
|
|
.TP
|
2007-12-23 21:29:09 +00:00
|
|
|
.B CONFIGURATION
|
|
|
|
Configuration details for a device.
|
|
|
|
This section normally only appears in Section 4 pages.
|
|
|
|
.TP
|
2007-05-22 23:46:32 +00:00
|
|
|
.B DESCRIPTION
|
|
|
|
gives an explanation of what the program, function, or format does.
|
|
|
|
Discuss how it interacts with files and standard input, and what it
|
|
|
|
produces on standard output or standard error.
|
|
|
|
Omit internals and implementation details unless they're critical for
|
|
|
|
understanding the interface.
|
|
|
|
Describe the usual case;
|
|
|
|
for information on command-line options of a program use the
|
|
|
|
.B OPTIONS
|
|
|
|
section.
|
|
|
|
.\" If there is some kind of input grammar or complex set of subcommands,
|
|
|
|
.\" consider describing them in a separate
|
|
|
|
.\" .B USAGE
|
|
|
|
.\" section (and just place an overview in the
|
|
|
|
.\" .B DESCRIPTION
|
|
|
|
.\" section).
|
|
|
|
.TP
|
|
|
|
.B OPTIONS
|
2007-06-21 22:55:04 +00:00
|
|
|
describes the command-line options accepted by a
|
2007-05-22 23:46:32 +00:00
|
|
|
program and how they change its behavior.
|
|
|
|
This section should only appear for Section 1 and 8 manual pages.
|
|
|
|
.\" .TP
|
|
|
|
.\" .B USAGE
|
|
|
|
.\" describes the grammar of any sublanguage this implements.
|
|
|
|
.TP
|
|
|
|
.B EXIT STATUS
|
|
|
|
lists the possible exit status values of a program and
|
|
|
|
the conditions that cause these values to be returned.
|
|
|
|
This section should only appear for Section 1 and 8 manual pages.
|
|
|
|
.TP
|
|
|
|
.B RETURN VALUE
|
|
|
|
For Section 2 and 3 pages, this section gives a
|
|
|
|
list of the values the library routine will return to the caller
|
|
|
|
and the conditions that cause these values to be returned.
|
|
|
|
.TP
|
|
|
|
.B ERRORS
|
|
|
|
For Section 2 and 3 manual pages, this is a list of the
|
|
|
|
values that may be placed in
|
|
|
|
.I errno
|
|
|
|
in the event of an error, along with information about the cause
|
|
|
|
of the errors.
|
2007-05-27 13:56:17 +00:00
|
|
|
.IR "The error list should be in alphabetical order" .
|
2007-05-22 23:46:32 +00:00
|
|
|
.TP
|
|
|
|
.B ENVIRONMENT
|
|
|
|
lists all environment variables that affect the program or function
|
|
|
|
and how they affect it.
|
|
|
|
.TP
|
|
|
|
.B FILES
|
|
|
|
lists the files the program or function uses, such as
|
|
|
|
configuration files, startup files,
|
|
|
|
and files the program directly operates on.
|
|
|
|
Give the full pathname of these files, and use the installation
|
|
|
|
process to modify the directory part to match user preferences.
|
|
|
|
For many programs, the default installation location is in
|
|
|
|
.IR /usr/local ,
|
|
|
|
so your base manual page should use
|
|
|
|
.I /usr/local
|
|
|
|
as the base.
|
|
|
|
.\" May 07: Almost no current man pages have a DIAGNOSTICS section;
|
|
|
|
.\" "RETURN VALUE" or "EXIT STATUS" is preferred.
|
|
|
|
.\" .TP
|
|
|
|
.\" .B DIAGNOSTICS
|
|
|
|
.\" gives an overview of the most common error messages and how to
|
|
|
|
.\" cope with them.
|
|
|
|
.\" You don't need to explain system error messages
|
|
|
|
.\" or fatal signals that can appear during execution of any program
|
|
|
|
.\" unless they're special in some way to the program.
|
|
|
|
.\"
|
|
|
|
.\" May 07: Almost no current man pages have a SECURITY section.
|
|
|
|
.\".TP
|
|
|
|
.\".B SECURITY
|
|
|
|
.\"discusses security issues and implications.
|
|
|
|
.\"Warn about configurations or environments that should be avoided,
|
|
|
|
.\"commands that may have security implications, and so on, especially
|
|
|
|
.\"if they aren't obvious.
|
|
|
|
.\"Discussing security in a separate section isn't necessary;
|
|
|
|
.\"if it's easier to understand, place security information in the
|
|
|
|
.\"other sections (such as the
|
|
|
|
.\" .B DESCRIPTION
|
|
|
|
.\" or
|
|
|
|
.\" .B USAGE
|
|
|
|
.\" section).
|
|
|
|
.\" However, please include security information somewhere!
|
|
|
|
.TP
|
|
|
|
.B VERSIONS
|
|
|
|
A brief summary of the Linux kernel or glibc versions where a
|
|
|
|
system call or library function appeared,
|
|
|
|
or changed significantly in its operation.
|
2008-06-11 13:41:00 +00:00
|
|
|
As a general rule, every new interface should
|
|
|
|
include a VERSIONS section in its manual page.
|
|
|
|
Unfortunately,
|
|
|
|
many existing manual pages don't include this information
|
|
|
|
(since there was no policy to do so when they were written).
|
|
|
|
Patches to remedy this are welcome,
|
|
|
|
but, from the perspective of programmers writing new code,
|
|
|
|
this information probably only matters in the case of kernel
|
|
|
|
interfaces that have been added in Linux 2.4 or later
|
|
|
|
(i.e., changes since kernel 2.2),
|
|
|
|
and library functions that have been added to glibc since version 2.1
|
|
|
|
(i.e., changes since glibc 2.0).
|
|
|
|
|
|
|
|
The
|
|
|
|
.BR syscalls (2)
|
2008-06-16 10:08:53 +00:00
|
|
|
manual page also provides information about kernel versions
|
|
|
|
in which various system calls first appeared.
|
2007-05-22 23:46:32 +00:00
|
|
|
.TP
|
|
|
|
.B CONFORMING TO
|
2007-05-23 06:16:43 +00:00
|
|
|
describes any standards or conventions that relate to the function
|
|
|
|
or command described by the manual page.
|
|
|
|
For a page in Section 2 or 3,
|
|
|
|
this section should note the POSIX.1
|
|
|
|
version(s) that the call conforms to,
|
|
|
|
and also whether the call is specified in C99.
|
|
|
|
(Don't worry too much about other standards like SUS, SUSv2, and XPG,
|
|
|
|
or the SVr4 and 4.xBSD implementation standards,
|
|
|
|
unless the call was specified in those standards,
|
|
|
|
but isn't in the current version of POSIX.1.)
|
|
|
|
(See
|
|
|
|
.BR standards (7).)
|
|
|
|
|
2007-06-21 22:55:04 +00:00
|
|
|
If the call is not governed by any standards but commonly
|
|
|
|
exists on other systems, note them.
|
2007-12-25 21:28:09 +00:00
|
|
|
If the call is Linux-specific, note this.
|
2008-07-15 13:30:35 +00:00
|
|
|
|
|
|
|
If this section consists of just a list of standards
|
|
|
|
(which it commonly does),
|
|
|
|
terminate the list with a period (\(aq.\(aq).
|
2007-05-22 23:46:32 +00:00
|
|
|
.TP
|
|
|
|
.B NOTES
|
|
|
|
provides miscellaneous notes.
|
2007-05-23 21:35:13 +00:00
|
|
|
For Section 2 and 3 man pages you may find it useful to include
|
2007-05-22 23:46:32 +00:00
|
|
|
subsections (\fBSS\fP) named \fILinux Notes\fP and \fIGlibc Notes\fP.
|
|
|
|
.TP
|
|
|
|
.B BUGS
|
|
|
|
lists limitations, known defects or inconveniences,
|
|
|
|
and other questionable activities.
|
|
|
|
.TP
|
|
|
|
.B EXAMPLE
|
|
|
|
provides one or more examples describing how this function, file or
|
|
|
|
command is used.
|
2007-05-23 06:16:43 +00:00
|
|
|
For details on writing example programs,
|
|
|
|
see \fIExample Programs\fP below.
|
2007-05-22 23:46:32 +00:00
|
|
|
.TP
|
2007-06-08 12:02:17 +00:00
|
|
|
.B AUTHORS
|
2007-05-23 21:35:13 +00:00
|
|
|
lists authors of the documentation or program.
|
2007-06-08 12:02:17 +00:00
|
|
|
\fBUse of an AUTHORS section is strongly discouraged\fP.
|
2007-05-22 23:46:32 +00:00
|
|
|
Generally, it is better not to clutter every page with a list
|
|
|
|
of (over time potentially numerous) authors;
|
|
|
|
if you write or significantly amend a page,
|
|
|
|
add a copyright notice as a comment in the source file.
|
2007-06-25 08:28:31 +00:00
|
|
|
If you are the author of a device driver and want to include
|
2007-05-23 21:35:13 +00:00
|
|
|
an address for reporting bugs, place this under the BUGS section.
|
2007-05-22 23:46:32 +00:00
|
|
|
.TP
|
|
|
|
.B SEE ALSO
|
2008-10-28 14:55:32 +00:00
|
|
|
provides a comma-separated list of related man pages,
|
2008-07-15 13:30:35 +00:00
|
|
|
ordered by section number and
|
2007-07-08 11:01:55 +00:00
|
|
|
then alphabetically by name, possibly followed by
|
2007-05-22 23:46:32 +00:00
|
|
|
other related pages or documents.
|
2008-07-15 13:30:35 +00:00
|
|
|
Do not terminate this with a period.
|
2012-09-25 04:19:44 +00:00
|
|
|
.IP
|
|
|
|
Where the SEE ALSO list contains many long manual page names,
|
|
|
|
to improve the visual result of the output, it may be useful to employ the
|
|
|
|
.I .ad l
|
|
|
|
(don't right justify)
|
|
|
|
and
|
|
|
|
.I .nh
|
2012-10-21 06:35:00 +00:00
|
|
|
(don't hyphenate)
|
2012-09-25 04:19:44 +00:00
|
|
|
directives.
|
2012-10-15 09:13:31 +00:00
|
|
|
Hyphenation of individual page names can be prevented
|
2012-09-25 04:19:44 +00:00
|
|
|
by preceding words with the string "\\%".
|
2007-05-22 23:46:32 +00:00
|
|
|
.SS Font conventions
|
|
|
|
.PP
|
|
|
|
For functions, the arguments are always specified using italics,
|
|
|
|
.IR "even in the SYNOPSIS section" ,
|
|
|
|
where the rest of the function is specified in bold:
|
|
|
|
.PP
|
|
|
|
.BI " int myfunction(int " argc ", char **" argv );
|
|
|
|
.PP
|
2008-06-26 13:15:49 +00:00
|
|
|
Variable names should, like argument names, be specified in italics.
|
|
|
|
.PP
|
2007-12-10 07:14:39 +00:00
|
|
|
Filenames (whether pathnames, or references to files in the
|
|
|
|
.I /usr/include
|
|
|
|
directory)
|
|
|
|
are always in italics (e.g.,
|
|
|
|
.IR <stdio.h> ),
|
2007-05-22 23:46:32 +00:00
|
|
|
except in the SYNOPSIS section, where included files are in bold (e.g.,
|
|
|
|
.BR "#include <stdio.h>" ).
|
2007-12-29 09:13:52 +00:00
|
|
|
When referring to a standard include file under
|
|
|
|
.IR /usr/include ,
|
|
|
|
specify the header file surrounded by angle brackets,
|
|
|
|
in the usual C way (e.g.,
|
2008-01-01 07:52:59 +00:00
|
|
|
.IR <stdio.h> ).
|
2007-05-22 23:46:32 +00:00
|
|
|
.PP
|
|
|
|
Special macros, which are usually in upper case, are in bold (e.g.,
|
|
|
|
.BR MAXINT ).
|
|
|
|
Exception: don't boldface NULL.
|
|
|
|
.PP
|
|
|
|
When enumerating a list of error codes, the codes are in bold (this list
|
|
|
|
usually uses the
|
|
|
|
.B \&.TP
|
|
|
|
macro).
|
|
|
|
.PP
|
2008-06-26 13:15:49 +00:00
|
|
|
Complete commands should, if long,
|
|
|
|
be written as in an indented line on their own, for example
|
|
|
|
.in +4n
|
|
|
|
.nf
|
|
|
|
|
|
|
|
man 7 man-pages
|
|
|
|
|
|
|
|
.fi
|
|
|
|
.in
|
2009-02-20 10:56:07 +00:00
|
|
|
If the command is short, then it can be included inline in the text,
|
2008-06-26 13:15:49 +00:00
|
|
|
in italic format, for example,
|
|
|
|
.IR "man 7 man-pages" .
|
accept.2, access.2, acct.2, clock_nanosleep.2, mbind.2, mincore.2, remap_file_pages.2, sched_setscheduler.2, set_mempolicy.2, splice.2, stat.2, syslog.2, timer_create.2, timerfd_create.2, truncate.2, fenv.3, ferror.3, fflush.3, fgetwc.3, fgetws.3, flockfile.3, fputwc.3, fputws.3, fread.3, getopt.3, gets.3, getwchar.3, glob.3, iconv.3, longjmp.3, pow.3, printf.3, puts.3, putwchar.3, regex.3, rpc.3, scanf.3, setjmp.3, termios.3, unlocked_stdio.3, wcswidth.3, hd.4, rtc.4, st.4, core.5, dir_colors.5, elf.5, proc.5, arp.7, ascii.7, boot.7, bootparam.7, charsets.7, futex.7, ip.7, iso_8859-11.7, man-pages.7, man.7, mdoc.samples.7, path_resolution.7, pipe.7, posixoptions.7, unicode.7, unix.7, uri.7, utf-8.7, ld.so.8: s/non-/non/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 17:20:12 +00:00
|
|
|
In this case, it may be worth using nonbreaking spaces
|
time.1, atexit.3, bsearch.3, dlopen.3, envz_add.3, errno.3, fmtmsg.3, getgrent_r.3, getline.3, getmntent.3, getnameinfo.3, getpass.3, getpwent_r.3, gets.3, isalpha.3, printf.3, puts.3, recno.3, scandir.3, stdarg.3, sysconf.3, termios.3, wordexp.3, null.4, core.5, dir_colors.5, issue.5, proc.5, termcap.5, utmp.5, ascii.7, cpuset.7, glob.7, man-pages.7, man.7, mdoc.7, mdoc.samples.7, regex.7: Revert 9f8e673e623d (whose global s%\\e%\\\\% caused problems)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-09-26 21:56:54 +00:00
|
|
|
("\e\ ") at suitable places in the command.
|
2008-06-26 13:15:49 +00:00
|
|
|
Command options should be written in italics, e.g.,
|
|
|
|
.IR \-l .
|
|
|
|
.PP
|
|
|
|
Expressions, if not written on a separate indented line, should
|
|
|
|
be specified in italics.
|
accept.2, access.2, acct.2, clock_nanosleep.2, mbind.2, mincore.2, remap_file_pages.2, sched_setscheduler.2, set_mempolicy.2, splice.2, stat.2, syslog.2, timer_create.2, timerfd_create.2, truncate.2, fenv.3, ferror.3, fflush.3, fgetwc.3, fgetws.3, flockfile.3, fputwc.3, fputws.3, fread.3, getopt.3, gets.3, getwchar.3, glob.3, iconv.3, longjmp.3, pow.3, printf.3, puts.3, putwchar.3, regex.3, rpc.3, scanf.3, setjmp.3, termios.3, unlocked_stdio.3, wcswidth.3, hd.4, rtc.4, st.4, core.5, dir_colors.5, elf.5, proc.5, arp.7, ascii.7, boot.7, bootparam.7, charsets.7, futex.7, ip.7, iso_8859-11.7, man-pages.7, man.7, mdoc.samples.7, path_resolution.7, pipe.7, posixoptions.7, unicode.7, unix.7, uri.7, utf-8.7, ld.so.8: s/non-/non/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 17:20:12 +00:00
|
|
|
Again, the use of nonbreaking spaces may be appropriate
|
2008-06-26 13:15:49 +00:00
|
|
|
if the expression is inlined with normal text.
|
|
|
|
.PP
|
2007-05-22 23:46:32 +00:00
|
|
|
Any reference to the subject of the current manual page
|
2007-05-23 21:35:13 +00:00
|
|
|
should be written with the name in bold.
|
|
|
|
If the subject is a function (i.e., this is a Section 2 or 3 page),
|
2007-06-21 22:55:04 +00:00
|
|
|
then the name should be followed by a pair of parentheses
|
2007-05-23 21:35:13 +00:00
|
|
|
in Roman (normal) font.
|
|
|
|
For example, in the
|
|
|
|
.BR fcntl (2)
|
|
|
|
man page, references to the subject of the page would be written as:
|
|
|
|
.BR fcntl ().
|
2007-05-22 23:46:32 +00:00
|
|
|
The preferred way to write this in the source file is:
|
|
|
|
.nf
|
|
|
|
|
2007-05-23 21:35:13 +00:00
|
|
|
.BR fcntl ()
|
2007-05-22 23:46:32 +00:00
|
|
|
|
|
|
|
.fi
|
|
|
|
(Using this format, rather than the use of "\\fB...\\fP()"
|
|
|
|
makes it easier to write tools that parse man page source files.)
|
|
|
|
.PP
|
|
|
|
Any reference to another man page
|
|
|
|
should be written with the name in bold,
|
|
|
|
\fIalways\fP followed by the section number,
|
|
|
|
formatted in Roman (normal) font, without any
|
|
|
|
separating spaces (e.g.,
|
|
|
|
.BR intro (2)).
|
|
|
|
The preferred way to write this in the source file is:
|
|
|
|
.nf
|
|
|
|
|
|
|
|
.BR intro (2)
|
|
|
|
|
|
|
|
.fi
|
|
|
|
(Including the section number in cross references lets tools like
|
|
|
|
.BR man2html (1)
|
|
|
|
create properly hyperlinked pages.)
|
2007-06-08 10:04:21 +00:00
|
|
|
.SS Spelling
|
2007-06-08 10:06:05 +00:00
|
|
|
Starting with release 2.59,
|
2007-06-08 10:04:21 +00:00
|
|
|
.I man-pages
|
|
|
|
follows American spelling conventions;
|
|
|
|
please write all new pages and patches according to these conventions.
|
2013-02-24 14:16:29 +00:00
|
|
|
.SS Capitalization
|
|
|
|
In subsection ("SS") headings
|
|
|
|
capitalize the first word in heading, but otherwise use lower case,
|
|
|
|
except where English usage (e.g., proper nouns) or programming
|
|
|
|
language requirements (e.g., identifier names) dictate otherwise.
|
intro.1, time.1, _syscall.2, accept.2, brk.2, capget.2, faccessat.2, futimesat.2, gethostname.2, intro.2, ioprio_set.2, kill.2, madvise.2, mlock.2, mount.2, msgget.2, perf_event_open.2, poll.2, readv.2, sched_rr_get_interval.2, sched_setscheduler.2, select.2, select_tut.2, shmget.2, stat.2, timer_create.2, ustat.2, vfork.2, wait.2, alloca.3, atexit.3, catopen.3, crypt.3, dbopen.3, fenv.3, fopen.3, getaddrinfo_a.3, gethostbyname.3, getutent.3, intro.3, login.3, mallopt.3, queue.3, regex.3, sigpause.3, sigsetops.3, stdio.3, strftime.3, strptime.3, sysconf.3, ttyslot.3, undocumented.3, cciss.4, console_codes.4, hpsa.4, initrd.4, intro.4, rtc.4, st.4, tty_ioctl.4, wavelan.4, acct.5, charmap.5, dir_colors.5, hosts.5, intro.5, termcap.5, utmp.5, intro.6, armscii-8.7, boot.7, bootparam.7, capabilities.7, cpuset.7, credentials.7, ddp.7, epoll.7, glob.7, intro.7, ip.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, man-pages.7, man.7, math_error.7, netlink.7, numa.7, packet.7, path_resolution.7, pipe.7, pthreads.7, raw.7, rtnetlink.7, signal.7, socket.7, spufs.7, svipc.7, tcp.7, time.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, utf-8.7, x25.7, intro.8: Global fix: use consistent capitalization in .SS headings
Capitalization in .SS sections across pages (and sometimes even
within a single page) is wildly inconsistent. Make it consistent.
Capitalize first word in heading, but otherwise use lower case,
except where English usage (e.g., proper nouns) or programming
language requirements (e.g., identifier names) dictate otherwise.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 14:08:38 +00:00
|
|
|
.SS Example programs and shell sessions
|
2007-06-21 22:55:04 +00:00
|
|
|
Manual pages can include example programs demonstrating how to
|
2007-05-22 23:46:32 +00:00
|
|
|
use a system call or library function.
|
|
|
|
However, note the following:
|
|
|
|
.TP 3
|
|
|
|
*
|
|
|
|
Example programs should be written in C.
|
|
|
|
.TP
|
|
|
|
*
|
|
|
|
An example program is only necessary and useful if it demonstrates
|
|
|
|
something beyond what can easily be provided in a textual
|
|
|
|
description of the interface.
|
|
|
|
An example program that does nothing
|
|
|
|
other than call an interface usually serves little purpose.
|
|
|
|
.TP
|
|
|
|
*
|
2008-07-09 15:41:19 +00:00
|
|
|
Example programs should be fairly short (preferably less than 100 lines;
|
|
|
|
ideally less than 50 lines).
|
2007-05-22 23:46:32 +00:00
|
|
|
.TP
|
|
|
|
*
|
|
|
|
Example programs should do error checking after system calls and
|
|
|
|
library function calls.
|
|
|
|
.TP
|
|
|
|
*
|
|
|
|
Example programs should be complete, and compile without
|
2008-06-26 13:23:48 +00:00
|
|
|
warnings when compiled with \fIcc\ \-Wall\fP.
|
2007-05-22 23:46:32 +00:00
|
|
|
.TP
|
|
|
|
*
|
|
|
|
Where possible and appropriate, example programs should allow
|
2007-06-08 09:56:56 +00:00
|
|
|
experimentation, by varying their behavior based on inputs
|
2007-05-22 23:46:32 +00:00
|
|
|
(ideally from command-line arguments, or alternatively, via
|
|
|
|
input read by the program).
|
|
|
|
.TP
|
|
|
|
*
|
|
|
|
Example programs should be laid out according to Kernighan and
|
2007-06-02 06:13:49 +00:00
|
|
|
Ritchie style, with 4-space indents.
|
2007-05-22 23:46:32 +00:00
|
|
|
(Avoid the use of TAB characters in source code!)
|
|
|
|
.PP
|
|
|
|
For some examples of what example programs should look like, see
|
|
|
|
.BR wait (2)
|
|
|
|
and
|
|
|
|
.BR pipe (2).
|
2008-10-28 14:54:53 +00:00
|
|
|
|
|
|
|
If you include a shell session demonstrating the use of a program
|
|
|
|
or other system feature, boldface the user input text,
|
|
|
|
to distinguish it from output produced by the system.
|
2007-12-19 06:01:40 +00:00
|
|
|
.SS Indentation of structure definitions, shell session logs, etc.
|
2012-05-06 20:14:32 +00:00
|
|
|
When structure definitions, shell session logs, and so on are included
|
2007-12-19 06:01:40 +00:00
|
|
|
in running text, indent them by 4 spaces (i.e., a block enclosed by
|
|
|
|
.I ".in\ +4n"
|
|
|
|
and
|
|
|
|
.IR ".in" ).
|
2007-05-22 23:46:32 +00:00
|
|
|
.SH EXAMPLE
|
|
|
|
For canonical examples of how man pages in the
|
2007-09-20 16:26:31 +00:00
|
|
|
.I man-pages
|
2007-05-22 23:46:32 +00:00
|
|
|
package should look, see
|
|
|
|
.BR pipe (2)
|
|
|
|
and
|
|
|
|
.BR fcntl (2).
|
|
|
|
.SH SEE ALSO
|
|
|
|
.BR man (1),
|
|
|
|
.BR man2html (1),
|
2007-07-08 11:01:55 +00:00
|
|
|
.BR groff (7),
|
|
|
|
.BR groff_man (7),
|
2007-05-22 23:46:32 +00:00
|
|
|
.BR man (7),
|
|
|
|
.BR mdoc (7)
|