diff options
Diffstat (limited to 'chapter06/util-linux.xml')
-rw-r--r-- | chapter06/util-linux.xml | 314 |
1 files changed, 314 insertions, 0 deletions
diff --git a/chapter06/util-linux.xml b/chapter06/util-linux.xml new file mode 100644 index 000000000..38aa75a84 --- /dev/null +++ b/chapter06/util-linux.xml @@ -0,0 +1,314 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> +<sect1 id="ch-system-util-linux" xreflabel="Util-linux"> +<title>Util-linux-&util-linux-version;</title> +<?dbhtml filename="util-linux.html"?> + +<indexterm zone="ch-system-util-linux"><primary sortas="a-Util-linux">Util-linux</primary></indexterm> + +<para>The Util-linux package contains miscellaneous utility programs. Among +them are utilities for handling file systems, consoles, partitions, and +messages.</para> + +<screen>&buildtime; 0.2 SBU +&diskspace; 16 MB</screen> + +<para>Util-linux installation depends on: Bash, Binutils, Coreutils, +Diffutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, Sed, Zlib.</para> + + + +<sect2> +<title>FHS compliance notes</title> + +<para>The FHS recommends that we use <filename>/var/lib/hwclock</filename>, +instead of the usual <filename>/etc</filename>, as the location for the +<filename>adjtime</filename> file. To make the <command>hwclock</command> +program FHS-compliant, run the following:</para> + +<screen><userinput>cp hwclock/hwclock.c{,.backup} +sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \ + hwclock/hwclock.c.backup > hwclock/hwclock.c +mkdir -p /var/lib/hwclock</userinput></screen> + +</sect2> + +<sect2> +<title>Installation of Util-linux</title> + +<para>Prepare Util-linux for compilation:</para> + +<screen><userinput>./configure</userinput></screen> + +<para>Compile the package:</para> + +<screen><userinput>make HAVE_KILL=yes HAVE_SLN=yes</userinput></screen> + +<para>The meaning of the make parameters:</para> + +<itemizedlist> +<listitem><para><userinput>HAVE_KILL=yes</userinput>: This prevents the +<command>kill</command> program (already installed by Procps) from being +built and installed again.</para></listitem> + +<listitem><para><userinput>HAVE_SLN=yes</userinput>: This prevents the +<command>sln</command> program (a statically linked +<command>ln</command> already installed by Glibc) from being built and +installed again.</para></listitem> +</itemizedlist> + +<para>Now install the package:</para> + +<screen><userinput>make HAVE_KILL=yes HAVE_SLN=yes install</userinput></screen> + +</sect2> + + +<sect2 id="contents-utillinux"><title>Contents of Util-linux</title> + +<para><emphasis>Installed programs</emphasis>: agetty, arch, blockdev, cal, +cfdisk, chkdupexe, col, colcrt, colrm, column, ctrlaltdel, cytune, ddate, +dmesg, elvtune, fdformat, fdisk, fsck.cramfs, fsck.minix, getopt, hexdump, +hwclock, ipcrm, ipcs, isosize, line, logger, look, losetup, mcookie, mkfs, +mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap, more, mount, namei, pg, pivot_root, +ramsize (link to rdev), raw, rdev, readprofile, rename, renice, rev, rootflags +(link to rdev), script, setfdprm, setsid, setterm, sfdisk, swapoff (link to +swapon), swapon, tunelp, ul, umount, vidmode (link to rdev), whereis and +write</para> + +</sect2> + +<sect2><title>Short descriptions</title> + +<indexterm zone="ch-system-util-linux agetty"><primary sortas="b-agetty">agetty</primary></indexterm> +<para id="agetty"><command>agetty</command> opens a tty port, prompts for a login name, +and then invokes the login program.</para> + +<indexterm zone="ch-system-util-linux arch"><primary sortas="b-arch">arch</primary></indexterm> +<para id="arch"><command>arch</command> reports the machine's architecture.</para> + +<indexterm zone="ch-system-util-linux blockdev"><primary sortas="b-blockdev">blockdev</primary></indexterm> +<para id="blockdev"><command>blockdev</command> allows you to call block device ioctls +from the command line.</para> + +<indexterm zone="ch-system-util-linux cal"><primary sortas="b-cal">cal</primary></indexterm> +<para id="cal"><command>cal</command> displays a simple calendar.</para> + +<indexterm zone="ch-system-util-linux cfdisk"><primary sortas="b-cfdisk">cfdisk</primary></indexterm> +<para id="cfdisk"><command>cfdisk</command> is used to manipulate the partition table +of the given device.</para> + +<indexterm zone="ch-system-util-linux chkdupexe"><primary sortas="b-chkdupexe">chkdupexe</primary></indexterm> +<para id="chkdupexe"><command>chkdupexe</command> finds duplicate executables.</para> + +<indexterm zone="ch-system-util-linux col"><primary sortas="b-col">col</primary></indexterm> +<para id="col"><command>col</command> filters out reverse line feeds.</para> + +<indexterm zone="ch-system-util-linux colcrt"><primary sortas="b-colcrt">colcrt</primary></indexterm> +<para id="colcrt"><command>colcrt</command> is used to filter nroff output for terminals +that lack some capabilities such as overstriking and half-lines.</para> + +<indexterm zone="ch-system-util-linux colrm"><primary sortas="b-colrm">colrm</primary></indexterm> +<para id="colrm"><command>colrm</command> filters out the given columns.</para> + +<indexterm zone="ch-system-util-linux column"><primary sortas="b-column">column</primary></indexterm> +<para id="column"><command>column</command> formats a given file into multiple +columns.</para> + +<indexterm zone="ch-system-util-linux ctrlaltdel"><primary sortas="b-ctrlaltdel">ctrlaltdel</primary></indexterm> +<para id="ctrlaltdel"><command>ctrlaltdel</command> sets the function of the Ctrl+Alt+Del + key combination to a hard or a soft reset.</para> + +<indexterm zone="ch-system-util-linux cytune"><primary sortas="b-cytune">cytune</primary></indexterm> +<para id="cytune"><command>cytune</command> was used to tune the parameters of the +serial line drivers for Cyclades cards.</para> + +<indexterm zone="ch-system-util-linux ddate"><primary sortas="b-ddate">ddate</primary></indexterm> +<para id="ddate"><command>ddate</command> gives the Discordian date, or converts the +given Gregorian date to a Discordian one.</para> + +<indexterm zone="ch-system-util-linux dmesg"><primary sortas="b-dmesg">dmesg</primary></indexterm> +<para id="dmesg"><command>dmesg</command> dumps the kernel boot messages.</para> + +<indexterm zone="ch-system-util-linux elvtune"><primary sortas="b-elvtune">elvtune</primary></indexterm> +<para id="elvtune"><command>elvtune</command> can be used to tune the performance +and interactivity of a block device.</para> + +<indexterm zone="ch-system-util-linux fdformat"><primary sortas="b-fdformat">fdformat</primary></indexterm> +<para id="fdformat"><command>fdformat</command> low-level formats a floppy disk.</para> + +<indexterm zone="ch-system-util-linux fdisk"><primary sortas="b-fdisk">fdisk</primary></indexterm> +<para id="fdisk"><command>fdisk</command> could be used to manipulate the partition +table of the given device.</para> + +<indexterm zone="ch-system-util-linux fsck.cramfs"><primary sortas="b-fsck.cramfs">fsck.cramfs</primary></indexterm> +<para id="fsck.cramfs"><command>fsck.cramfs</command> performs a consistency check on the +Cramfs file system on the given device.</para> + +<indexterm zone="ch-system-util-linux fsck.minix"><primary sortas="b-fsck.minix">fsck.minix</primary></indexterm> +<para id="fsck.minix"><command>fsck.minix</command> performs a consistency check on the +Minix file system on the given device.</para> + +<indexterm zone="ch-system-util-linux getopt"><primary sortas="b-getopt">getopt</primary></indexterm> +<para id="getopt"><command>getopt</command> parses options in the given command line.</para> + +<indexterm zone="ch-system-util-linux hexdump"><primary sortas="b-hexdump">hexdump</primary></indexterm> +<para id="hexdump"><command>hexdump</command> dumps the given file in hexadecimal, or +in another given format.</para> + +<indexterm zone="ch-system-util-linux hwclock"><primary sortas="b-hwclock">hwclock</primary></indexterm> +<para id="hwclock"><command>hwclock</command> is used to read or set the system's +hardware clock, also called the RTC (Real-Time Clock) or BIOS (Basic Input-Output System) clock.</para> + +<indexterm zone="ch-system-util-linux ipcrm"><primary sortas="b-ipcrm">ipcrm</primary></indexterm> +<para id="ipcrm"><command>ipcrm</command> removes the given IPC resource.</para> + +<indexterm zone="ch-system-util-linux ipcs"><primary sortas="b-ipcs">ipcs</primary></indexterm> +<para id="ipcs"><command>ipcs</command> provides IPC status information.</para> + +<indexterm zone="ch-system-util-linux isosize"><primary sortas="b-isosize">isosize</primary></indexterm> +<para id="isosize"><command>isosize</command> reports the size of an iso9660 +file system.</para> + +<indexterm zone="ch-system-util-linux line"><primary sortas="b-line">line</primary></indexterm> +<para id="line"><command>line</command> copies a single line.</para> + +<indexterm zone="ch-system-util-linux logger"><primary sortas="b-logger">logger</primary></indexterm> +<para id="logger"><command>logger</command> enters the given message into the system +log.</para> + +<indexterm zone="ch-system-util-linux look"><primary sortas="b-look">look</primary></indexterm> +<para id="look"><command>look</command> displays lines that begin with the given +string.</para> + +<indexterm zone="ch-system-util-linux losetup"><primary sortas="b-losetup">losetup</primary></indexterm> +<para id="losetup"><command>losetup</command> is used to set up and control loop devices.</para> + +<indexterm zone="ch-system-util-linux mcookie"><primary sortas="b-mcookie">mcookie</primary></indexterm> +<para id="mcookie"><command>mcookie</command> generates magic cookies, 128-bit random +hexadecimal numbers, for xauth.</para> + +<indexterm zone="ch-system-util-linux mkfs"><primary sortas="b-mkfs">mkfs</primary></indexterm> +<para id="mkfs"><command>mkfs</command> is used to build a file system on a device +(usually a hard disk partition).</para> + +<indexterm zone="ch-system-util-linux mkfs.bfs"><primary sortas="b-mkfs.bfs">mkfs.bfs</primary></indexterm> +<para id="mkfs.bfs"><command>mkfs.bfs</command> creates an SCO (Santa Cruz Operations) bfs file system.</para> + +<indexterm zone="ch-system-util-linux mkfs.cramfs"><primary sortas="b-mkfs.cramfs">mkfs.cramfs</primary></indexterm> +<para id="mkfs.cramfs"><command>mkfs.cramfs</command> creates a cramfs file system.</para> + +<indexterm zone="ch-system-util-linux mkfs.minix"><primary sortas="b-mkfs.minix">mkfs.minix</primary></indexterm> +<para id="mkfs.minix"><command>mkfs.minix</command> creates a Minix file system.</para> + +<indexterm zone="ch-system-util-linux mkswap"><primary sortas="b-mkswap">mkswap</primary></indexterm> +<para id="mkswap"><command>mkswap</command> initializes the given device or file to be +used as a swap area.</para> + +<indexterm zone="ch-system-util-linux more"><primary sortas="b-more">more</primary></indexterm> +<para id="more"><command>more</command> is a filter for paging through text one +screen full at a time. But less is much better.</para> + +<indexterm zone="ch-system-util-linux mount"><primary sortas="b-mount">mount</primary></indexterm> +<para id="mount"><command>mount</command> attaches the file system on the given device +to a specified directory (thus hiding the contents of that directory) in the file-system tree.</para> + +<indexterm zone="ch-system-util-linux namei"><primary sortas="b-namei">namei</primary></indexterm> +<para id="namei"><command>namei</command> shows the symbolic links in the given +pathnames.</para> + +<indexterm zone="ch-system-util-linux pg"><primary sortas="b-pg">pg</primary></indexterm> +<para id="pg"><command>pg</command> displays a text file one screen full at a +time.</para> + +<indexterm zone="ch-system-util-linux pivot_root"><primary sortas="b-pivot_root">pivot_root</primary></indexterm> +<para id="pivot_root"><command>pivot_root</command> makes the given file system the new +root file system of the current process.</para> + +<indexterm zone="ch-system-util-linux ramsize"><primary sortas="b-ramsize">ramsize</primary></indexterm> +<para id="ramsize"><command>ramsize</command> is used to set the size of the +RAM disk in a bootable image.</para> + +<indexterm zone="ch-system-util-linux rdev"><primary sortas="b-rdev">rdev</primary></indexterm> +<para id="rdev"><command>rdev</command> is used to query and set the root +device and other things in a bootable image.</para> + +<indexterm zone="ch-system-util-linux readprofile"><primary sortas="b-readprofile">readprofile</primary></indexterm> +<para id="readprofile"><command>readprofile</command> reads kernel profiling information.</para> + +<indexterm zone="ch-system-util-linux rename"><primary sortas="b-rename">rename</primary></indexterm> +<para id="rename"><command>rename</command> renames the given files, replacing a given +string with another.</para> + +<indexterm zone="ch-system-util-linux renice"><primary sortas="b-renice">renice</primary></indexterm> +<para id="renice"><command>renice</command> is used to alter the priority of running +processes.</para> + +<indexterm zone="ch-system-util-linux rev"><primary sortas="b-rev">rev</primary></indexterm> +<para id="rev"><command>rev</command> reverses the lines of a given file.</para> + +<indexterm zone="ch-system-util-linux rootflags"><primary sortas="b-rootflags">rootflags</primary></indexterm> +<para id="rootflags"><command>rootflags</command> is used to set the rootflags +in a bootable image.</para> + +<indexterm zone="ch-system-util-linux script"><primary sortas="b-script">script</primary></indexterm> +<para id="script"><command>script</command> makes a typescript of a terminal +session, of everything printed to the terminal.</para> + +<indexterm zone="ch-system-util-linux setfdprm"><primary sortas="b-setfdprm">setfdprm</primary></indexterm> +<para id="setfdprm"><command>setfdprm</command> sets user-provided floppy disk +parameters.</para> + +<indexterm zone="ch-system-util-linux setsid"><primary sortas="b-setsid">setsid</primary></indexterm> +<para id="setsid"><command>setsid</command> runs the given program in a new session.</para> + +<indexterm zone="ch-system-util-linux setterm"><primary sortas="b-setterm">setterm</primary></indexterm> +<para id="setterm"><command>setterm</command> is used to set terminal attributes.</para> + +<indexterm zone="ch-system-util-linux sfdisk"><primary sortas="b-sfdisk">sfdisk</primary></indexterm> +<para id="sfdisk"><command>sfdisk</command> is a disk partition table manipulator.</para> + +<indexterm zone="ch-system-util-linux swapdev"><primary sortas="b-swapdev">swapdev</primary></indexterm> +<para id="swapdev"><command>swapdev</command> is used to set the swap device +in a bootable image.</para> + +<indexterm zone="ch-system-util-linux swapoff"><primary sortas="b-swapoff">swapoff</primary></indexterm> +<para id="swapoff"><command>swapoff</command> disables devices and files for paging +and swapping.</para> + +<indexterm zone="ch-system-util-linux swapon"><primary sortas="b-swapon">swapon</primary></indexterm> +<para id="swapon"><command>swapon</command> enables devices and files for paging +and swapping.</para> + +<indexterm zone="ch-system-util-linux tunelp"><primary sortas="b-tunelp">tunelp</primary></indexterm> +<para id="tunelp"><command>tunelp</command> is used to tune the parameters of the +line printer.</para> + +<indexterm zone="ch-system-util-linux ul"><primary sortas="b-ul">ul</primary></indexterm> +<para id="ul"><command>ul</command> is a filter for translating underscores into +escape sequences indicating underlining for the terminal in use.</para> + +<indexterm zone="ch-system-util-linux umount"><primary sortas="b-umount">umount</primary></indexterm> +<para id="umount"><command>umount</command> disconnects a file system from the +system's file tree.</para> + +<indexterm zone="ch-system-util-linux vidmode"><primary sortas="b-vidmode">vidmode</primary></indexterm> +<para id="vidmode"><command>vidmode</command> could be used to set the video mode +in a bootable image.</para> + +<indexterm zone="ch-system-util-linux whereis"><primary sortas="b-whereis">whereis</primary></indexterm> +<para id="whereis"><command>whereis</command> reports the location of binary, the +source, and the manual page for the given command.</para> + +<indexterm zone="ch-system-util-linux write"><primary sortas="b-write">write</primary></indexterm> +<para id="write"><command>write</command> sends a message to the given user, +<emphasis>if</emphasis> that user has not disabled such messages.</para> + +</sect2> + + + +</sect1> |