home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1996-04-02 | 97.1 KB | 2,782 lines
<HTML> <HEAD> <!-- This HTML file has been created by TEXI.HTM 1.31 from /usr/src/file-utilities/fileutils-3.12/doc/fileutils.texi on 8 June 1995 --> <TITLE>GNU fileutils, version GNU fileutils 3.12</TITLE> </HEAD> <BODY> <H1>GNU fileutils, version GNU fileutils 3.12</H1> <P> @defcodeindex op <P> Copyright (C) 1994 Free Software Foundation, Inc. <P> 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. <P> 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. <P> Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation. <P> <H1><A NAME="SEC1" HREF="FILEUTIL.HTM#SEC1">Introduction</A></H1> <A NAME="IDX1"></A> <P> This manual is incomplete: No attempt is made to explain basic file concepts in a way suitable for novices. Thus, if you are interested, please get involved in improving this manual. The entire GNU community will benefit. <A NAME="IDX2"></A> <P> The GNU file utilities are mostly compatible with the POSIX.2 standard. <A NAME="IDX3"></A> <P> Please report bugs to <SAMP>`bug-gnu-utils@prep.ai.mit.edu'</SAMP>. Remember to include the version number, machine architecture, input files, and any other information needed to reproduce the bug. See section `Bugs' in <CITE>GNU CC</CITE>. <A NAME="IDX4"></A> <P> This manual is based on the Unix man pages in the distribution, which were originally written by David MacKenzie and updated by Jim Meyering. Pinard did the initial conversion to Texinfo format. Karl Berry did the indexing, some reorganization, and editing of the results. Richard Stallman contributed his usual invaluable insights to the overall process. <P> <H1><A NAME="SEC2" HREF="FILEUTIL.HTM#SEC2">Common options</A></H1> <A NAME="IDX5"></A> <P> Certain options are available in all these programs. Rather than writing identical descriptions for each of the programs, they are described here. (In fact, every GNU program accepts (or should accept) these options.) <P> <DL COMPACT> <DT><SAMP>`--help'</SAMP> <DD>@opindex --help <A NAME="IDX6"></A> Print a usage message listing all available options, then exit successfully. <DT><SAMP>`--version'</SAMP> <DD>@opindex --version <A NAME="IDX7"></A> Print the version number, then exit successfully. </DL> <P> <H2><A NAME="SEC3" HREF="FILEUTIL.HTM#SEC3">Backup options</A></H2> <A NAME="IDX8"></A> <P> Some GNU programs (at least <CODE>cp</CODE>, <CODE>mv</CODE>, and <CODE>ln</CODE>) optionally make backups of files before writing new versions. These options control the details of these backups. The options are also briefly mentioned in the descriptions of the particular programs. <P> <DL COMPACT> <DT><SAMP>`-b'</SAMP> <DD><DT><SAMP>`--backup'</SAMP> <DD>@opindex -b @opindex --backup <A NAME="IDX9"></A> Make backups of files that are about to be overwritten or removed. Without this option, the original versions are destroyed. <DT><SAMP>`-S <VAR>suffix</VAR>'</SAMP> <DD><DT><SAMP>`--suffix=<VAR>suffix</VAR>'</SAMP> <DD>@opindex -S @opindex --suffix <A NAME="IDX11"></A> <A NAME="IDX10"></A> Append <VAR>suffix</VAR> to each backup file made with <SAMP>`-b'</SAMP>. If this option is not specified, the value of the <CODE>SIMPLE_BACKUP_SUFFIX</CODE> environment variable is used. And if <CODE>SIMPLE_BACKUP_SUFFIX</CODE> is not set, the default is <SAMP>`~'</SAMP>, just as in Emacs. <DT><SAMP>`-V <VAR>method</VAR>'</SAMP> <DD><DT><SAMP>`--version-control=<VAR>method</VAR>'</SAMP> <DD>@opindex -V @opindex --version-control <A NAME="IDX13"></A> <A NAME="IDX12"></A> Use <VAR>method</VAR> to determine the type of backups made with <SAMP>`-b'</SAMP>. If this option is not specified, the value of the <CODE>VERSION_CONTROL</CODE> environment variable is used. And if <CODE>VERSION_CONTROL</CODE> is not set, the default backup type is <SAMP>`existing'</SAMP>. <A NAME="IDX14"></A> This option corresponds to the Emacs variable <SAMP>`version-control'</SAMP>; the same values for <VAR>method</VAR> are accepted as in Emacs. This options also more descriptive name. The valid <VAR>method</VAR>s (unique abbreviations are accepted): <DL COMPACT> <DT><SAMP>`t'</SAMP> <DD><DT><SAMP>`numbered'</SAMP> <DD>@opindex numbered backup method Always make numbered backups. <DT><SAMP>`nil'</SAMP> <DD><DT><SAMP>`existing'</SAMP> <DD>@opindex existing backup method Make numbered backups of files that already have them, simple backups of the others. <DT><SAMP>`never'</SAMP> <DD><DT><SAMP>`simple'</SAMP> <DD>@opindex simple backup method Always make simple backups. </DL> </DL> <P> <H1><A NAME="SEC4" HREF="FILEUTIL.HTM#SEC4">File permissions</A></H1> <A NAME="IDX15"></A> <A NAME="IDX16"></A> <P> Each file has a set of <DFN>permissions</DFN> that control the kinds of access that users have to that file. The permissions for a file are also called its <DFN>access mode</DFN>. They can be represented either in symbolic form or as an octal number. <P> <H2><A NAME="SEC5" HREF="FILEUTIL.HTM#SEC5">Structure of File Permissions</A></H2> <P> There are three kinds of permissions that a user can have for a file: <P> <OL> <A NAME="IDX17"></A> <LI> permission to read the file. For directories, this means permission to list the contents of the directory. <A NAME="IDX18"></A> <LI> permission to write to (change) the file. For directories, this means permission to create and remove files in the directory. <A NAME="IDX19"></A> <LI> permission to execute the file (run it as a program). For directories, this means permission to access files in the directory. </OL> <P> There are three categories of users who may have different permissions to perform any of the above operations on a file: <P> <OL> <LI> the file's owner; <LI> other users who are in the file's group; <LI> everyone else. </OL> <A NAME="IDX20"></A> <A NAME="IDX21"></A> <P> Files are given an owner and group when they are created. Usually the owner is the current user and the group is the group of the directory the file is in, but this varies with the operating system, the filesystem the file is created on, and the way the file is created. You can change the owner and group of a file by using the <CODE>chown</CODE> and <CODE>chgrp</CODE> commands. <P> In addition to the three sets of three permissions listed above, a file's permissions have three special components, which affect only executable files (programs) and, on some systems, directories: <P> <OL> <A NAME="IDX22"></A> <LI> set the process's effective user ID to that of the file upon execution (called the <DFN>setuid bit</DFN>). No effect on directories. <A NAME="IDX23"></A> <LI> set the process's effective group ID to that of the file upon execution (called the <DFN>setgid bit</DFN>). For directories on some systems, put files created in the directory into the same group as the directory, no matter what group the user who creates them is in. <A NAME="IDX24"></A> <A NAME="IDX25"></A> <A NAME="IDX26"></A> <A NAME="IDX27"></A> <LI> save the program's text image on the swap device so it will load more quickly when run (called the <DFN>sticky bit</DFN>). For directories on some systems, prevent users from removing files that they do not own in the directory; this is called making the directory <DFN>append-only</DFN>. </OL> <P> <H2><A NAME="SEC6" HREF="FILEUTIL.HTM#SEC6">Symbolic Modes</A></H2> <A NAME="IDX28"></A> <P> <DFN>Symbolic modes</DFN> represent changes to files' permissions as operations on single-character symbols. They allow you to modify either all or selected parts of files' permissions, optionally based on their previous values, and perhaps on the current <CODE>umask</CODE> as well (see section <A HREF="FILEUTIL.000#SEC12">The Umask and Protection</A>). <P> The format of symbolic modes is: <P> <PRE> [ugoa...][[+-=][rwxXstugo...]...][,...] </PRE> <P> The following sections describe the operators and other details of symbolic modes. <P> <H3><A NAME="SEC7" HREF="FILEUTIL.HTM#SEC7">Setting Permissions</A></H3> <P> The basic symbolic operations on a file's permissions are adding, removing, and setting the permission that certain users have to read, write, and execute the file. These operations have the following format: <P> <PRE> <VAR>users</VAR> <VAR>operation</VAR> <VAR>permissions</VAR> </PRE> <P> The spaces between the three parts above are shown for readability only; symbolic modes can not contain spaces. <P> The <VAR>users</VAR> part tells which users' access to the file is changed. It consists of one or more of the following letters (or it can be empty; see section <A HREF="FILEUTIL.000#SEC12">The Umask and Protection</A>, for a description of what happens then). When more than one of these letters is given, the order that they are in does not matter. <P> <DL COMPACT> <A NAME="IDX29"></A> <DT><CODE>u</CODE> <DD>the user who owns the file; <A NAME="IDX30"></A> <DT><CODE>g</CODE> <DD>other users who are in the file's group; <A NAME="IDX31"></A> <DT><CODE>o</CODE> <DD>all other users; <DT><CODE>a</CODE> <DD>all users; the same as <SAMP>`ugo'</SAMP>. </DL> <P> The <VAR>operation</VAR> part tells how to change the affected users' access to the file, and is one of the following symbols: <P> <DL COMPACT> <A NAME="IDX32"></A> <DT><CODE>+</CODE> <DD>to add the <VAR>permissions</VAR> to whatever permissions the <VAR>users</VAR> already have for the file; <A NAME="IDX33"></A> <A NAME="IDX34"></A> <DT><CODE>-</CODE> <DD>to remove the <VAR>permissions</VAR> from whatever permissions the <VAR>users</VAR> already have for the file; <A NAME="IDX35"></A> <DT><CODE>=</CODE> <DD>to make the <VAR>permissions</VAR> the only permissions that the <VAR>users</VAR> have for the file. </DL> <P> The <VAR>permissions</VAR> part tells what kind of access to the file should be changed; it is zero or more of the following letters. As with the <VAR>users</VAR> part, the order does not matter when more than one letter is given. Omitting the <VAR>permissions</VAR> part is useful only with the <SAMP>`='</SAMP> operation, where it gives the specified <VAR>users</VAR> no access at all to the file. <P> <DL COMPACT> <A NAME="IDX36"></A> <DT><CODE>r</CODE> <DD>the permission the <VAR>users</VAR> have to read the file; <A NAME="IDX37"></A> <DT><CODE>w</CODE> <DD>the permission the <VAR>users</VAR> have to write to the file; <A NAME="IDX38"></A> <DT><CODE>x</CODE> <DD>the permission the <VAR>users</VAR> have to execute the file. </DL> <P> For example, to give everyone permission to read and write a file, but not to execute it, use: <P> <PRE> a=rw </PRE> <P> To remove write permission for from all users other than the file's owner, use: <P> <PRE> go-w </PRE> <P> The above command does not affect the access that the owner of the file has to it, nor does it affect whether other users can read or execute the file. <P> To give everyone except a file's owner no permission to do anything with that file, use the mode below. Other users could still remove the file, if they have write permission on the directory it is in. <P> <PRE> go= </PRE> <P> Another way to specify the same thing is: <P> <PRE> og-rxw </PRE> <P> <H3><A NAME="SEC8" HREF="FILEUTIL.HTM#SEC8">Copying Existing Permissions</A></H3> <A NAME="IDX39"></A> <A NAME="IDX40"></A> <P> You can base part of a file's permissions on part of its existing permissions. To do this, instead of using <SAMP>`r'</SAMP>, <SAMP>`w'</SAMP>, or <SAMP>`x'</SAMP> after the operator, you use the letter <SAMP>`u'</SAMP>, <SAMP>`g'</SAMP>, or <SAMP>`o'</SAMP>. For example, the mode <P> <PRE> o+g </PRE> <P> adds the permissions for users who are in a file's group to the permissions that other users have for the file. Thus, if the file started out as mode 664 (<SAMP>`rw-rw-r--'</SAMP>), the above mode would change it to mode 666 (<SAMP>`rw-rw-rw-'</SAMP>). If the file had started out as mode 741 (<SAMP>`rwxr----x'</SAMP>), the above mode would change it to mode 745 (<SAMP>`rwxr--r-x'</SAMP>). The <SAMP>`-'</SAMP> and <SAMP>`='</SAMP> operations work analogously. <P> <H3><A NAME="SEC9" HREF="FILEUTIL.HTM#SEC9">Changing Special Permissions</A></H3> <A NAME="IDX41"></A> <P> In addition to changing a file's read, write, and execute permissions, you can change its special permissions. See section <A HREF="FILEUTIL.000#SEC5">Structure of File Permissions</A>, for a summary of these permissions. <P> To change a file's permission to set the user ID on execution, use <SAMP>`u'</SAMP> in the <VAR>users</VAR> part of the symbolic mode and <SAMP>`s'</SAMP> in the <VAR>permissions</VAR> part. <P> To change a file's permission to set the group ID on execution, use <SAMP>`g'</SAMP> in the <VAR>users</VAR> part of the symbolic mode and <SAMP>`s'</SAMP> in the <VAR>permissions</VAR> part. <P> To change a file's permission to stay permanently on the swap device, use <SAMP>`o'</SAMP> in the <VAR>users</VAR> part of the symbolic mode and <SAMP>`t'</SAMP> in the <VAR>permissions</VAR> part. <P> For example, to add set user ID permission to a program, you can use the mode: <P> <PRE> u+s </PRE> <P> To remove both set user ID and set group ID permission from it, you can use the mode: <P> <PRE> ug-s </PRE> <P> To cause a program to be saved on the swap device, you can use the mode: <P> <PRE> o+t </PRE> <P> Remember that the special permissions only affect files that are executable, plus, on some systems, directories (on which they have different meanings; see section <A HREF="FILEUTIL.000#SEC5">Structure of File Permissions</A>). Using <SAMP>`a'</SAMP> in the <VAR>users</VAR> part of a symbolic mode does not cause the special permissions to be affected; thus, <P> <PRE> a+s </PRE> <P> has <EM>no effect</EM>. You must use <SAMP>`u'</SAMP>, <SAMP>`g'</SAMP>, and <SAMP>`o'</SAMP> explicitly to affect the special permissions. Also, the combinations <SAMP>`u+t'</SAMP>, <SAMP>`g+t'</SAMP>, and <SAMP>`o+s'</SAMP> have no effect. <P> The <SAMP>`='</SAMP> operator is not very useful with special permissions; for example, the mode: <P> <PRE> o=t </PRE> <P> does cause the file to be saved on the swap device, but it also removes all read, write, and execute permissions that users not in the file's group might have had for it. <P> <H3><A NAME="SEC10" HREF="FILEUTIL.HTM#SEC10">Conditional Executability</A></H3> <A NAME="IDX42"></A> <P> There is one more special type of symbolic permission: if you use <SAMP>`X'</SAMP> instead of <SAMP>`x'</SAMP>, execute permission is affected only if the file already had execute permission or is a directory. It affects directories' execute permission even if they did not initially have any execute permissions set. <P> For example, this mode: <P> <PRE> a+X </PRE> <P> gives all users permission to execute files (or search directories) if anyone could before. <P> <H3><A NAME="SEC11" HREF="FILEUTIL.HTM#SEC11">Making Multiple Changes</A></H3> <A NAME="IDX43"></A> <P> The format of symbolic modes is actually more complex than described above (see section <A HREF="FILEUTIL.000#SEC7">Setting Permissions</A>). It provides two ways to make multiple changes to files' permissions. <P> The first way is to specify multiple <VAR>operation</VAR> and <VAR>permissions</VAR> parts after a <VAR>users</VAR> part in the symbolic mode. <P> For example, the mode: <P> <PRE> og+rX-w </PRE> <P> gives users other than the owner of the file read permission and, if it is a directory or if someone already had execute permission to it, gives them execute permission; and it also denies them write permission to it file. It does not affect the permission that the owner of the file has for it. The above mode is equivalent to the two modes: <P> <PRE> og+rX og-w </PRE> <P> The second way to make multiple changes is to specify more than one simple symbolic mode, separated by commas. For example, the mode: <P> <PRE> a+r,go-w </PRE> <P> gives everyone permission to read the file and removes write permission on it for all users except its owner. Another example: <P> <PRE> u=rwx,g=rx,o= </PRE> <P> sets all of the non-special permissions for the file explicitly. (It gives users who are not in the file's group no permission at all for it.) <P> The two methods can be combined. The mode: <P> <PRE> a+r,g+x-w </PRE> <P> gives all users permission to read the file, and gives users who are in the file's group permission to execute it, as well, but not permission to write to it. The above mode could be written in several different ways; another is: <P> <PRE> u+r,g+rx,o+r,g-w </PRE> <P> <H3><A NAME="SEC12" HREF="FILEUTIL.HTM#SEC12">The Umask and Protection</A></H3> <A NAME="IDX44"></A> <A NAME="IDX45"></A> <P> If the <VAR>users</VAR> part of a symbolic mode is omitted, it defaults to <SAMP>`a'</SAMP> (affect all users), except that any permissions that are <EM>set</EM> in the system variable <CODE>umask</CODE> are <EM>not affected</EM>. The value of <CODE>umask</CODE> can be set using the <CODE>umask</CODE> command. Its default value varies from system to system. <A NAME="IDX46"></A> <P> Omitting the <VAR>users</VAR> part of a symbolic mode is generally not useful with operations other than <SAMP>`+'</SAMP>. It is useful with <SAMP>`+'</SAMP> because it allows you to use <CODE>umask</CODE> as an easily customizable protection against giving away more permission to files than you intended to. <P> As an example, if <CODE>umask</CODE> has the value 2, which removes write permission for users who are not in the file's group, then the mode: <P> <PRE> +w </PRE> <P> adds permission to write to the file to its owner and to other users who are in the file's group, but <EM>not</EM> to other users. In contrast, the mode: <P> <PRE> a+w </PRE> <P> ignores <CODE>umask</CODE>, and <EM>does</EM> give write permission for the file to all users. <P> <H2><A NAME="SEC13" HREF="FILEUTIL.HTM#SEC13">Numeric Modes</A></H2> <A NAME="IDX47"></A> <A NAME="IDX48"></A> <A NAME="IDX49"></A> <P> File permissions are stored internally as 16 bit integers. As an alternative to giving a symbolic mode, you can give an octal (base 8) number that corresponds to the internal representation of the new mode. This number is always interpreted in octal; you do not have to add a leading 0, as you do in C. Mode 0055 is the same as mode 55. <P> A numeric mode is usually shorter than the corresponding symbolic mode, but it is limited in that it can not take into account a file's previous permissions; it can only set them absolutely. <P> The permissions granted to the user, to other users in the file's group, and to other users not in the file's group are each stored as three bits, which are represented as one octal digit. The three special permissions are also each stored as one bit, and they are as a group represented as another octal digit. Here is how the bits are arranged in the 16 bit integer, starting with the lowest valued bit: <P> <PRE> Value in Corresponding Mode Permission Other users not in the file's group: 1 Execute 2 Write 4 Read Other users in the file's group: 10 Execute 20 Write 40 Read The file's owner: 100 Execute 200 Write 400 Read Special permissions: 1000 Save text image on swap device 2000 Set group ID on execution 4000 Set user ID on execution </PRE> <P> For example, numeric mode 4755 corresponds to symbolic mode <SAMP>`u=rwxs,go=rx'</SAMP>, and numeric mode 664 corresponds to symbolic mode <SAMP>`ug=rw,o=r'</SAMP>. Numeric mode 0 corresponds to symbolic mode <SAMP>`ugo='</SAMP>. <P> <H1><A NAME="SEC14" HREF="FILEUTIL.HTM#SEC14">Directory listing</A></H1> <P> This chapter describes the <CODE>ls</CODE> command and its variants <CODE>dir</CODE> and <CODE>vdir</CODE>, which list information about files. <P> <H2><A NAME="SEC15" HREF="FILEUTIL.HTM#SEC15"><CODE>ls</CODE>: List directory contents</A></H2> <A NAME="IDX50"></A> <A NAME="IDX51"></A> <P> The <CODE>ls</CODE> program lists information about files (of any type, including directories). Options and file arguments can be intermixed arbitrarily, as usual. <P> For non-option command-line arguments that are directories, by default <CODE>ls</CODE> lists the contents of directories, not recursively, and omitting files with names beginning with <CODE>.</CODE>. For other non-option arguments, by default <CODE>ls</CODE> lists just the filename. If no non-option arguments are specified, <CODE>ls</CODE> lists the contents of the current directory. <P> By default, the output is sorted alphabetically. If standard output is a terminal, the output is in columns (sorted vertically); otherwise, they are listed one per line. <P> Because <CODE>ls</CODE> is such a fundamental program, it has accumulated many options over the years. They are described in the subsections below; within each section, options are listed alphabetically (ignoring case). The division of options into the subsections is not absolute, since some options affect more than one aspect of <CODE>ls</CODE>'s operation. <P> @opindex -g Also, the <SAMP>`-g'</SAMP> option is accepted but ignored, for compatibility with Unix. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <H3><A NAME="SEC16" HREF="FILEUTIL.HTM#SEC16">Which files are listed</A></H3> <P> These options determine which files <CODE>ls</CODE> lists information for. By default, any files and the contents of any directories on the command line are shown. <P> <DL COMPACT> <DT><SAMP>`-a'</SAMP> <DD><DT><SAMP>`--all'</SAMP> <DD>@opindex -a @opindex --all List all files in directories, including files that start with <SAMP>`.'</SAMP>. <DT><SAMP>`-A'</SAMP> <DD><DT><SAMP>`--almost-all'</SAMP> <DD>@opindex -A @opindex --almost-all List all files in directories except for <TT>`.'</TT> and <TT>`..'</TT>. <DT><SAMP>`-B'</SAMP> <DD><DT><SAMP>`--ignore-backups'</SAMP> <DD>@opindex -B @opindex --ignore-backups <A NAME="IDX52"></A> Do not list files that end with <SAMP>`~'</SAMP>, unless they are given on the command line. <DT><SAMP>`-d'</SAMP> <DD><DT><SAMP>`--directory'</SAMP> <DD>@opindex -d @opindex --directory List just the names of directories, as with other types of files, rather than listing their contents. <DT><SAMP>`-I'</SAMP> <DD><DT><SAMP>`--ignore'</SAMP> <DD>@opindex -I @opindex --ignore=<VAR>pattern</VAR> Do not list files whose names match the shell pattern (not regular expression) <VAR>pattern</VAR> unless they are given on the command line. As in the shell, an initial <SAMP>`.'</SAMP> in a filename does not match a wildcard at the start of <VAR>pattern</VAR>. <DT><SAMP>`-L'</SAMP> <DD><DT><SAMP>`--dereference'</SAMP> <DD>@opindex -L @opindex --dereference <A NAME="IDX53"></A> List the files linked to by symbolic links instead of listing the contents of the links. <DT><SAMP>`-R'</SAMP> <DD><DT><SAMP>`--recursive'</SAMP> <DD>@opindex -R @opindex --recursive <A NAME="IDX55"></A> <A NAME="IDX54"></A> List the contents of all directories recursively. </DL> <P> <H3><A NAME="SEC17" HREF="FILEUTIL.HTM#SEC17">What information is listed</A></H3> <P> These options affect the information that <CODE>ls</CODE> displays. By default, only filenames are shown. <P> <DL COMPACT> <DT><SAMP>`-D'</SAMP> <DD><DT><SAMP>`--dired'</SAMP> <DD>@opindex -D @opindex --dired <A NAME="IDX56"></A> With the long listing (<SAMP>`-l'</SAMP>) format, print an additional line after the main output: <PRE> //DIRED// <VAR>beg1 end1 beg2 end2 ...</VAR> </PRE> The <VAR>begN</VAR> and <VAR>endN</VAR> are unsigned integers which record the byte position of the beginning and end of each filename in the output. This makes it easy for Emacs to find the names, even when they contain unusual characters such as space or newline, without fancy searching. If directories are being listed recursively (<CODE>-R</CODE>), output a similar line after each subdirectory: <PRE> //SUBDIRED// <VAR>beg1 end1 ...</VAR> </PRE> <DT><SAMP>`-G'</SAMP> <DD><DT><SAMP>`--no-group'</SAMP> <DD>@opindex -G @opindex --no-group Inhibit display of group information in a long format directory listing. (This is the default in some non-GNU versions of <CODE>ls</CODE>, so we provide this option for compatibility.) <DT><SAMP>`-i'</SAMP> <DD><DT><SAMP>`--inode'</SAMP> <DD>@opindex -i @opindex --inode <A NAME="IDX57"></A> Print the inode number (also called the file serial number and index number) of each file to the left of the filename. (This number uniquely identifies each file within a particular filesystem.) <DT><SAMP>`-l'</SAMP> <DD><DT><SAMP>`--format=long'</SAMP> <DD><DT><SAMP>`--format=verbose'</SAMP> <DD>@opindex -l @opindex --format @opindex long ls format @opindex verbose ls format In addition to the name of each file, print the file type, permissions, number of hard links, owner name, group name, size in bytes, and timestamp (by default, the modification time). For files with a time more than 6 months old or more than 1 hour into the future, the timestamp contains the year instead of the time of day. For each directory that is listed, preface the files with a line <CODE>total <VAR>blocks</VAR></CODE>, where <VAR>blocks</VAR> is the total disk space used by all files in that directory. By default, 1024-byte blocks are used; if the environment variable <CODE>POSIXLY_CORRECT</CODE> is set, 512-byte blocks are used (unless the <SAMP>`-k'</SAMP> option is given). The <VAR>blocks</VAR> computed counts each hard link separately; this is arguably a bug. This output format is the default for the GNU <CODE>v</CODE> and <CODE>vdir</CODE> programs. <DT><SAMP>`-s'</SAMP> <DD><DT><SAMP>`--size'</SAMP> <DD>@opindex -s @opindex --size <A NAME="IDX59"></A> <A NAME="IDX58"></A> Print the size of each file in 1024-byte blocks to the left of the filename. If the environment variable <CODE>POSIXLY_CORRECT</CODE> is set, 512-byte blocks are used instead, unless the <SAMP>`-k'</SAMP> option is given (see section <A HREF="FILEUTIL.000#SEC19">General output formatting</A>). <A NAME="IDX60"></A> For files that are NFS-mounted from an HP-UX system to a BSD system, this option reports sizes that are half the correct values. On HP-UX systems, it reports sizes that are twice the correct values for files that are NFS-mounted from BSD systems. This is due to a flaw in HP-UX; it also affects the HP-UX <CODE>ls</CODE> program. </DL> <P> <H3><A NAME="SEC18" HREF="FILEUTIL.HTM#SEC18">Sorting the output</A></H3> <A NAME="IDX61"></A> <P> These options change the order in which <CODE>ls</CODE> sorts the information it outputs. By default, sorting is done by character code (e.g., ASCII order). <P> <DL COMPACT> <DT><SAMP>`-c'</SAMP> <DD><DT><SAMP>`--time=ctime'</SAMP> <DD><DT><SAMP>`--time=status'</SAMP> <DD>@opindex -c @opindex --time @opindex ctime, sorting by @opindex status time, sorting by Sort according to the status change time (the <SAMP>`ctime'</SAMP> in the inode). If the long listing format (<SAMP>`-l'</SAMP>) is being used, print the status change time instead of the modification time. <DT><SAMP>`-f'</SAMP> <DD>@opindex -f Primarily, like <SAMP>`-U'</SAMP>---do not sort; list the files in whatever order they are stored in the directory. But also enable <SAMP>`-a'</SAMP> (list all files) and disable <SAMP>`-l'</SAMP> and <SAMP>`-s'</SAMP> (if they were specified before the <SAMP>`-f'</SAMP>). <DT><SAMP>`-r'</SAMP> <DD><DT><SAMP>`--reverse'</SAMP> <DD>@opindex -r @opindex --reverse <A NAME="IDX62"></A> Reverse whatever the sorting method is--e.g., list files in reverse alphabetical order, youngest first, smallest first, or whatever. <DT><SAMP>`-S'</SAMP> <DD><DT><SAMP>`--sort=size'</SAMP> <DD>@opindex -S @opindex --sort @opindex size of files, sorting files by Sort by file size, largest first. <DT><SAMP>`-t'</SAMP> <DD><DT><SAMP>`--sort=time'</SAMP> <DD>@opindex -t @opindex --sort @opindex modification time, sorting files by Sort by modification time (the <SAMP>`mtime'</SAMP> in the inode), newest first. <DT><SAMP>`-u'</SAMP> <DD><DT><SAMP>`--time=atime'</SAMP> <DD><DT><SAMP>`--time=access'</SAMP> <DD><DT><SAMP>`--time=use'</SAMP> <DD>@opindex -u @opindex --time @opindex atime, sorting files by @opindex access time, sorting files by @opindex use time, sorting files by Sort by access time (the <SAMP>`atime'</SAMP> in the inode). If the long listing format is being used, print the last access time. <DT><SAMP>`-U'</SAMP> <DD><DT><SAMP>`--sort=none'</SAMP> <DD>@opindex -U @opindex --sort @opindex none, sorting option for <CODE>ls</CODE> Do not sort; list the files in whatever order they are stored in the directory. (Do not do any of the other unrelated things that <SAMP>`-f'</SAMP> does.) This is especially useful when listing very large directories, since not doing any sorting can be noticeably faster. <DT><SAMP>`-X'</SAMP> <DD><DT><SAMP>`--sort=extension'</SAMP> <DD>@opindex -X @opindex --sort @opindex extension, sorting files by Sort directory contents alphabetically by file extension (characters after the last <SAMP>`.'</SAMP>); files with no extension are sorted first. </DL> <P> <H3><A NAME="SEC19" HREF="FILEUTIL.HTM#SEC19">General output formatting</A></H3> <P> These options affect the appearance of the overall output. <P> <DL COMPACT> <DT><SAMP>`-1'</SAMP> <DD><DT><SAMP>`--format=single-column'</SAMP> <DD>@opindex -1 @opindex --format @opindex single-column output of files List one file per line. This is the default for <CODE>ls</CODE> when standard output is not a terminal. <DT><SAMP>`-C'</SAMP> <DD><DT><SAMP>`--format=vertical'</SAMP> <DD>@opindex -C @opindex --format @opindex vertical sorted files in columns List files in columns, sorted vertically. This is the default for <CODE>ls</CODE> if standard output is a terminal. It is always the default for the <CODE>dir</CODE> and <CODE>d</CODE> programs. <DT><SAMP>`-F'</SAMP> <DD><DT><SAMP>`--classify'</SAMP> <DD>@opindex -F @opindex --classify <A NAME="IDX64"></A> <A NAME="IDX63"></A> Append a character to each filename indicating the file type. Also, for regular files that are executable, append <SAMP>`*'</SAMP>. The file type indicators are <SAMP>`/'</SAMP> for directories, <SAMP>`@'</SAMP> for symbolic links, <SAMP>`|'</SAMP> for FIFOs, <SAMP>`='</SAMP> for sockets, and nothing for regular files. <DT><SAMP>`--full-time'</SAMP> <DD>@opindex --full-time List times in full, rather than using the standard abbreviation heuristics. The format is the same as <CODE>date</CODE>'s default; it's not possible to change this, but you can extract out the date string with <CODE>cut</CODE> and then pass the result to <CODE>date -d</CODE>. See section `date invocation' in <CITE>Shell utilities</CITE>. This is most useful because the time output includes the seconds. (Unix filesystems store file timestamps only to the nearest second, so this option shows all the information there is.) For example, this can help when you have a Makefile that is not regenerating files properly. <DT><SAMP>`-k'</SAMP> <DD><DT><SAMP>`--kilobytes'</SAMP> <DD>@opindex -k @opindex --kilobytes <A NAME="IDX65"></A> If file sizes are being listed, print them in kilobytes. This overrides the environment variable <CODE>POSIXLY_CORRECT</CODE>. <DT><SAMP>`-m'</SAMP> <DD><DT><SAMP>`--format=commas'</SAMP> <DD>@opindex -m @opindex --format @opindex commas, outputting between files List files horizontally, with as many as will fit on each line, separated by <SAMP>`, '</SAMP> (a comma and a space). <DT><SAMP>`-n'</SAMP> <DD><DT><SAMP>`--numeric-uid-gid'</SAMP> <DD>@opindex -n @opindex --numeric-uid-gid <A NAME="IDX66"></A> List the numeric UID and GID instead of the names. <A NAME="IDX67"></A> <DT><SAMP>`-p'</SAMP> <DD>Append a character to each filename indicating the file type. This is like <SAMP>`-F'</SAMP>, except that executables are not marked. <DT><SAMP>`-x'</SAMP> <DD><DT><SAMP>`--format=across'</SAMP> <DD><DT><SAMP>`--format=horizontal'</SAMP> <DD>@opindex -x @opindex --format @opindex across, listing files @opindex horizontal, listing files List the files in columns, sorted horizontally. <DT><SAMP>`-T'</SAMP> <DD><DT><SAMP>`--tabsize=<VAR>cols</VAR>'</SAMP> <DD>@opindex -T @opindex --tabsize Assume that each tabstop is <VAR>cols</VAR> columns wide. The default is 8. <CODE>ls</CODE> uses tabs where possible in the output, for efficiency. <DT><SAMP>`-w'</SAMP> <DD><DT><SAMP>`--width=<VAR>cols</VAR>'</SAMP> <DD>@opindex -w @opindex --width <A NAME="IDX68"></A> Assume the screen is <VAR>cols</VAR> columns wide. The default is taken from the terminal settings if possible; otherwise the environment variable <CODE>COLUMNS</CODE> is used if it is set; otherwise the default is 80. </DL> <P> <H3><A NAME="SEC20" HREF="FILEUTIL.HTM#SEC20">Formatting the filenames</A></H3> <P> These options change how filenames themselves are printed. <P> <DL COMPACT> <DT><SAMP>`-b'</SAMP> <DD><DT><SAMP>`--escape'</SAMP> <DD>@opindex -b @opindex --escape <A NAME="IDX69"></A> Quote nongraphic characters in filenames using alphabetic and octal backslash sequences like those used in C. <DT><SAMP>`-N'</SAMP> <DD><DT><SAMP>`--literal'</SAMP> <DD>@opindex -N @opindex --literal Do not quote filenames. <DT><SAMP>`-q'</SAMP> <DD><DT><SAMP>`--hide-control-chars'</SAMP> <DD>@opindex -q @opindex --hide-control-chars Print question marks instead of nongraphic characters in filenames. This is the default. <DT><SAMP>`-Q'</SAMP> <DD><DT><SAMP>`--quote-name'</SAMP> <DD>@opindex -Q @opindex --quote-name Enclose filenames in double quotes and quote nongraphic characters as in C. </DL> <P> <H2><A NAME="SEC21" HREF="FILEUTIL.HTM#SEC21"><CODE>dir</CODE>: Briefly list directory contents</A></H2> <A NAME="IDX70"></A> <A NAME="IDX71"></A> <P> The <CODE>dir</CODE> program (also installed as <CODE>d</CODE>) is equivalent to <CODE>ls -C</CODE>; that is, files are by default always listed in columns, sorted vertically. <P> See section <A HREF="FILEUTIL.000#SEC15"><CODE>ls</CODE>: List directory contents</A>. <P> <H2><A NAME="SEC22" HREF="FILEUTIL.HTM#SEC22"><CODE>vdir</CODE>: Verbosely list directory contents</A></H2> <A NAME="IDX72"></A> <A NAME="IDX73"></A> <P> The <CODE>vdir</CODE> program (also installed <CODE>v</CODE>)is equivalent to <CODE>ls -l</CODE>; that is, files are by default listed in long format. <P> <H1><A NAME="SEC23" HREF="FILEUTIL.HTM#SEC23">Basic operations</A></H1> <A NAME="IDX74"></A> <P> This chapter describes the commands for basic file manipulation: copying, moving (renaming), and deleting (removing). <P> <H2><A NAME="SEC24" HREF="FILEUTIL.HTM#SEC24"><CODE>cp</CODE>: Copy files and directories</A></H2> <A NAME="IDX75"></A> <A NAME="IDX76"></A> <A NAME="IDX77"></A> <A NAME="IDX78"></A> <P> <CODE>cp</CODE> copies files (or, optionally, directories). The copy is completely independent of the original. You can either copy one file to another, or copy arbitrarily many files to a destination directory. Synopsis: <P> <PRE> cp [<VAR>option</VAR>]... <VAR>source</VAR> <VAR>dest</VAR> cp [<VAR>option</VAR>]... <VAR>source</VAR>... <VAR>directory</VAR> </PRE> <P> If the last argument names an existing directory, <CODE>cp</CODE> copies each <VAR>source</VAR> file into that directory (retaining the same name). Otherwise, if only two files are given, it copies the first onto the second. It is an error if the last argument is not a directory and more than two non-option arguments are given. <A NAME="IDX79"></A> <A NAME="IDX80"></A> <P> If the source file contains holes, <CODE>cp</CODE> copies them and other blocks of zero bytes as holes. Otherwise, files are written just as they are read. (A <DFN>hole</DFN> is a sequence of zero bytes that does not occupy any physical disk blocks; the <SAMP>`read'</SAMP> system call reads these as zeroes.) <P> By default, <CODE>cp</CODE> does not copy directories. It also refuses to copy a file onto itself. <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-a'</SAMP> <DD><DT><SAMP>`--archive'</SAMP> <DD>@opindex -a @opindex --archive Preserve as much as possible of the structure and attributes of the original files in the copy. Equivalent to <SAMP>`-dpR'</SAMP>. <DT><SAMP>`-b'</SAMP> <DD><DT><SAMP>`--backup'</SAMP> <DD>@opindex -b @opindex --backup <A NAME="IDX81"></A> Make backups of files that are about to be overwritten or removed. See section <A HREF="FILEUTIL.000#SEC3">Backup options</A>. <DT><SAMP>`-d'</SAMP> <DD><DT><SAMP>`--no-dereference'</SAMP> <DD>@opindex -d @opindex --no-dereference <A NAME="IDX83"></A> <A NAME="IDX82"></A> Copy symbolic links as symbolic links rather than copying the files that they point to, and preserve hard links between source files in the copies. <DT><SAMP>`-f'</SAMP> <DD><DT><SAMP>`--force'</SAMP> <DD>@opindex -f @opindex --force Remove existing destination files. <DT><SAMP>`-i'</SAMP> <DD><DT><SAMP>`--interactive'</SAMP> <DD>@opindex -i @opindex --interactive Prompt whether to overwrite existing regular destination files. <DT><SAMP>`-l'</SAMP> <DD><DT><SAMP>`--link'</SAMP> <DD>@opindex -l @opindex --link Make hard links instead of copies of non-directories. <DT><SAMP>`-p'</SAMP> <DD><DT><SAMP>`--preserve'</SAMP> <DD>@opindex -p @opindex --preserve <A NAME="IDX84"></A> Preserve the original files' owner, group, permissions, and timestamps. <DT><SAMP>`-P'</SAMP> <DD><DT><SAMP>`--parents'</SAMP> <DD>@opindex -P @opindex --parents <A NAME="IDX85"></A> Form the name of each destination file by appending to the target directory a slash and the specified name of the source file. The last argument given to <CODE>cp</CODE> must be the name of an existing directory. For example, the command: <PRE> cp --parents a/b/c existing_dir </PRE> copies the file <TT>`a/b/c'</TT> to <TT>`existing_dir/a/b/c'</TT>, creating any missing intermediate directories. <A NAME="IDX86"></A> <A NAME="IDX87"></A> <A NAME="IDX88"></A> <A NAME="IDX89"></A> <DT><SAMP>`-r'</SAMP> <DD>Copy directories recursively, copying any non-directories and non-symbolic links (that is, FIFOs and special files) as if they were regular files. This means trying to read the data in each source file and writing it to the destination. Thus, with this option, <CODE>cp</CODE> may well hang indefinitely reading a FIFO, unless something else happens to be writing it. <DT><SAMP>`-R'</SAMP> <DD><DT><SAMP>`--recursive'</SAMP> <DD>@opindex -R @opindex --recursive Copy directories recursively, preserving non-directories (see <SAMP>`-r'</SAMP> just above). <DT><SAMP>`-s'</SAMP> <DD><DT><SAMP>`--symbolic-link'</SAMP> <DD>@opindex -s @opindex --symbolic-link <A NAME="IDX90"></A> Make symbolic links instead of copies of non-directories. All source filenames must be absolute (starting with <SAMP>`/'</SAMP>) unless the destination files are in the current directory. This option merely results in an error message on systems that do not support symbolic links. <DT><SAMP>`-S <VAR>suffix</VAR>'</SAMP> <DD><DT><SAMP>`--suffix=<VAR>suffix</VAR>'</SAMP> <DD>@opindex -S @opindex --suffix Append <VAR>suffix</VAR> to each backup file made with <SAMP>`-b'</SAMP>. See section <A HREF="FILEUTIL.000#SEC3">Backup options</A>. <DT><SAMP>`-u'</SAMP> <DD><DT><SAMP>`--update'</SAMP> <DD>@opindex -u @opindex --update <A NAME="IDX91"></A> Do not copy a nondirectory that has an existing destination with the same or newer modification time. <DT><SAMP>`-v'</SAMP> <DD><DT><SAMP>`--verbose'</SAMP> <DD>@opindex -v @opindex --verbose Print the name of each file before copying it. <DT><SAMP>`-V <VAR>method</VAR>'</SAMP> <DD><DT><SAMP>`--version-control=<VAR>method</VAR>'</SAMP> <DD>@opindex -V @opindex --version-control Change the type of backups made with <SAMP>`-b'</SAMP>. The <VAR>method</VAR> argument can be <SAMP>`numbered'</SAMP> (or <SAMP>`t'</SAMP>), <SAMP>`existing'</SAMP> (or <SAMP>`nil'</SAMP>), or <SAMP>`never'</SAMP> (or <SAMP>`simple'</SAMP>). See section <A HREF="FILEUTIL.000#SEC3">Backup options</A>. <DT><SAMP>`-x'</SAMP> <DD><DT><SAMP>`--one-file-system'</SAMP> <DD>@opindex -x @opindex --one-file-system <A NAME="IDX92"></A> Skip subdirectories that are on different filesystems from the one that the copy started on. </DL> <P> <H2><A NAME="SEC25" HREF="FILEUTIL.HTM#SEC25"><CODE>dd</CODE>: Convert and copy a file</A></H2> <A NAME="IDX93"></A> <A NAME="IDX94"></A> <P> <CODE>dd</CODE> copies a file (from standard input to standard output, by default) with a changeable I/O blocksize, while optionally performing conversions on it. Synopsis: <P> <PRE> dd [<VAR>option</VAR>]... </PRE> <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <A NAME="IDX95"></A> <P> The numeric-valued options below (<VAR>bytes</VAR> and <VAR>blocks</VAR>) can be followed by a multiplier: <SAMP>`b'</SAMP>=512, <SAMP>`c'</SAMP>=1, <SAMP>`k'</SAMP>=1024, <SAMP>`w'</SAMP>=2, <SAMP>`x<VAR>m</VAR>'</SAMP>=<VAR>m</VAR>. <P> <DL COMPACT> <DT><SAMP>`if=<VAR>file</VAR>'</SAMP> <DD>@opindex if Read from <VAR>file</VAR> instead of standard input. <DT><SAMP>`of=<VAR>file</VAR>'</SAMP> <DD>@opindex of Write to <VAR>file</VAR> instead of standard output. Unless <SAMP>`conv=notrunc'</SAMP> is given, <CODE>dd</CODE> truncates <VAR>file</VAR> to zero bytes (or the size specified with <SAMP>`seek='</SAMP>). <DT><SAMP>`ibs=<VAR>bytes</VAR>'</SAMP> <DD>@opindex ibs <A NAME="IDX97"></A> <A NAME="IDX96"></A> Read <VAR>bytes</VAR> bytes at a time. <DT><SAMP>`obs=<VAR>bytes</VAR>'</SAMP> <DD>@opindex obs <A NAME="IDX99"></A> <A NAME="IDX98"></A> Write <VAR>bytes</VAR> bytes at a time. <DT><SAMP>`bs=<VAR>bytes</VAR>'</SAMP> <DD>@opindex bs <A NAME="IDX100"></A> Both read and write <VAR>bytes</VAR> bytes at a time. This overrides <SAMP>`ibs'</SAMP> and <SAMP>`obs'</SAMP>. <DT><SAMP>`cbs=<VAR>bytes</VAR>'</SAMP> <DD>@opindex cbs <A NAME="IDX102"></A> <A NAME="IDX101"></A> Convert <VAR>bytes</VAR> bytes at a time. <DT><SAMP>`skip=<VAR>blocks</VAR>'</SAMP> <DD>@opindex skip Skip <VAR>blocks</VAR> <SAMP>`ibs'</SAMP>-byte blocks in the input file before copying. <DT><SAMP>`seek=<VAR>blocks</VAR>'</SAMP> <DD>@opindex seek Skip <VAR>blocks</VAR> <SAMP>`obs'</SAMP>-byte blocks in the output file before copying. <DT><SAMP>`count=<VAR>blocks</VAR>'</SAMP> <DD>@opindex count Copy <VAR>blocks</VAR> <SAMP>`obs'</SAMP>-byte blocks from the input file, instead of everything until the end of the file. <DT><SAMP>`conv=<VAR>conversion</VAR>[,<VAR>conversion</VAR>]...'</SAMP> <DD>@opindex conv Convert the file as specified by the <VAR>conversion</VAR> argument(s). (No spaces around any comma(s).) Conversions: <DL COMPACT> <DT><SAMP>`ascii'</SAMP> <DD>@opindex ascii, converting to Convert EBCDIC to ASCII. <DT><SAMP>`ebcdic'</SAMP> <DD>@opindex ebcdic, converting to Convert ASCII to EBCDIC. <DT><SAMP>`ibm'</SAMP> <DD>@opindex alternate ebcdic, converting to Convert ASCII to alternate EBCDIC. <DT><SAMP>`block'</SAMP> <DD>@opindex block (space-padding) For each line in the input, output <SAMP>`cbs'</SAMP> bytes, replacing the input newline with a space and padding with spaces as necessary. <DT><SAMP>`unblock'</SAMP> <DD>@opindex unblock Replace trailing spaces in each <SAMP>`cbs'</SAMP>-sized input block with a newline. <DT><SAMP>`lcase'</SAMP> <DD>@opindex lcase, converting to Change uppercase letters to lowercase. <DT><SAMP>`ucase'</SAMP> <DD>@opindex ucase, converting to Change lowercase letters to uppercase. <DT><SAMP>`swab'</SAMP> <DD>@opindex swab (byte-swapping) <A NAME="IDX103"></A> Swap every pair of input bytes. GNU <CODE>dd</CODE>, unlike others, works when an odd number of bytes are read--the last byte is simply copied (since there is nothing to swap it with). <DT><SAMP>`noerror'</SAMP> <DD>@opindex noerror <A NAME="IDX104"></A> Continue after read errors. <DT><SAMP>`notrunc'</SAMP> <DD>@opindex notrunc <A NAME="IDX105"></A> Do not truncate the output file. <DT><SAMP>`sync'</SAMP> <DD>@opindex sync (padding with nulls) Pad every input block to size of <SAMP>`ibs'</SAMP> with trailing zero bytes. </DL> </DL> <P> <H2><A NAME="SEC26" HREF="FILEUTIL.HTM#SEC26"><CODE>install</CODE>: Copy files and set attributes</A></H2> <A NAME="IDX106"></A> <A NAME="IDX107"></A> <P> <CODE>install</CODE> copies files while setting their permission modes and, if possible, their owner and group. Synopses: <P> <PRE> install [<VAR>option</VAR>]... <VAR>source</VAR> <VAR>dest</VAR> install [<VAR>option</VAR>]... <VAR>source</VAR>... <VAR>directory</VAR> install -d [<VAR>option</VAR>]... <VAR>directory</VAR>... </PRE> <P> In the first of these, the <VAR>source</VAR> file is copied to the <VAR>dest</VAR> target file. In the second, each of the <VAR>source</VAR> files are copied to the destination <VAR>directory</VAR>. In the last, each <VAR>directory</VAR> (and any missing parent directories) is created. <A NAME="IDX108"></A> <P> <CODE>install</CODE> is similar to <CODE>cp</CODE>, but allows you to control the attributes of destination files. It is typically used in Makefiles to copy programs into their destination directories. It refuses to copy files onto themselves. <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-c'</SAMP> <DD>@opindex -c Ignored; for compatibility with old Unix versions of <CODE>install</CODE>. <DT><SAMP>`-d'</SAMP> <DD><DT><SAMP>`--directory'</SAMP> <DD>@opindex -d @opindex --directory <A NAME="IDX110"></A> <A NAME="IDX111"></A> <A NAME="IDX109"></A> Create each given directory and any missing parent directories, setting the owner, group and mode as given on the command line or to the defaults. It also gives any parent directories it creates those attributes. (This is different from the SunOS 4.x <CODE>install</CODE>, which gives directories that it creates the default attributes.) <DT><SAMP>`-g <VAR>group</VAR>'</SAMP> <DD><DT><SAMP>`--group=<VAR>group</VAR>'</SAMP> <DD>@opindex -g @opindex --group <A NAME="IDX112"></A> Set the group ownership of installed files or directories to <VAR>group</VAR>. The default is the process's current group. <VAR>group</VAR> may be either a group name or a numeric group id. <DT><SAMP>`-m <VAR>mode</VAR>'</SAMP> <DD><DT><SAMP>`--mode=<VAR>mode</VAR>'</SAMP> <DD>@opindex -m @opindex --mode <A NAME="IDX113"></A> Set the permissions for the installed file or directory to <VAR>mode</VAR>, which can be either an octal number, or a symbolic mode as in <CODE>chmod</CODE>, with 0 as the point of departure (see section <A HREF="FILEUTIL.000#SEC4">File permissions</A>). The default mode is 0755--read, write, and execute for the owner, and read and execute for group and other. <DT><SAMP>`-o <VAR>owner</VAR>'</SAMP> <DD><DT><SAMP>`--owner=<VAR>owner</VAR>'</SAMP> <DD>@opindex -o @opindex --owner <A NAME="IDX115"></A> <A NAME="IDX116"></A> <A NAME="IDX114"></A> If <CODE>install</CODE> has appropriate privileges (is run as root), set the ownership of installed files or directories to <VAR>owner</VAR>. The default is <CODE>root</CODE>. <VAR>owner</VAR> may be either a user name or a numeric user ID. <DT><SAMP>`-s'</SAMP> <DD><DT><SAMP>`--strip'</SAMP> <DD>@opindex -s @opindex --strip <A NAME="IDX118"></A> <A NAME="IDX117"></A> Strip the symbol tables from installed binary executables. </DL> <P> <H2><A NAME="SEC27" HREF="FILEUTIL.HTM#SEC27"><CODE>mv</CODE>: Move (rename) files</A></H2> <A NAME="IDX119"></A> <P> <CODE>mv</CODE> moves or renames files (or directories). Synopsis: <P> <PRE> mv [<VAR>option</VAR>]... <VAR>source</VAR> <VAR>dest</VAR> mv [<VAR>option</VAR>]... <VAR>source</VAR>... <VAR>directory</VAR> </PRE> <P> If the last argument names an existing directory, <CODE>mv</CODE> moves each other given file into a file with the same name in that directory. Otherwise, if only two files are given, it renames the first as the second. It is an error if the last argument is not a directory and more than two files are given. <P> <CODE>mv</CODE> can move only regular files across filesystems. <A NAME="IDX120"></A> <P> If a destination file exists but is normally unwritable, standard input is a terminal, and the <SAMP>`-f'</SAMP> or <SAMP>`--force'</SAMP> option is not given, <CODE>mv</CODE> prompts the user for whether to replace the file. (You might own the file, or have write permission on its directory.) If the response does not begin with <SAMP>`y'</SAMP> or <SAMP>`Y'</SAMP>, the file is skipped. <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-b'</SAMP> <DD><DT><SAMP>`--backup'</SAMP> <DD>@opindex -b @opindex --backup <A NAME="IDX121"></A> Make backups of files that are about to be overwritten or removed. See section <A HREF="FILEUTIL.000#SEC3">Backup options</A>. <DT><SAMP>`-f'</SAMP> <DD><DT><SAMP>`--force'</SAMP> <DD>@opindex -f @opindex --force <A NAME="IDX122"></A> Remove existing destination files and never prompt the user. <DT><SAMP>`-i'</SAMP> <DD><DT><SAMP>`--interactive'</SAMP> <DD>@opindex -i @opindex --interactive <A NAME="IDX123"></A> Prompt whether to overwrite each existing destination file, regardless of its permissions. If the response does not begin with <SAMP>`y'</SAMP> or <SAMP>`Y'</SAMP>, the file is skipped. <DT><SAMP>`-u'</SAMP> <DD><DT><SAMP>`--update'</SAMP> <DD>@opindex -u @opindex --update <A NAME="IDX124"></A> Do not move a nondirectory that has an existing destination with the same or newer modification time. <DT><SAMP>`-v'</SAMP> <DD><DT><SAMP>`--verbose'</SAMP> <DD>@opindex -v @opindex --verbose Print the name of each file before moving it. <DT><SAMP>`-S <VAR>suffix</VAR>'</SAMP> <DD><DT><SAMP>`--suffix=<VAR>suffix</VAR>'</SAMP> <DD>@opindex -S @opindex --suffix Append <VAR>suffix</VAR> to each backup file made with <SAMP>`-b'</SAMP>. See section <A HREF="FILEUTIL.000#SEC3">Backup options</A>. <DT><SAMP>`-V <VAR>method</VAR>'</SAMP> <DD><DT><SAMP>`--version-control=<VAR>method</VAR>'</SAMP> <DD>@opindex -V @opindex --version-control Change the type of backups made with <SAMP>`-b'</SAMP>. The <VAR>method</VAR> argument can be <SAMP>`numbered'</SAMP> (or <SAMP>`t'</SAMP>), <SAMP>`existing'</SAMP> (or <SAMP>`nil'</SAMP>), or <SAMP>`never'</SAMP> (or <SAMP>`simple'</SAMP>). See section <A HREF="FILEUTIL.000#SEC3">Backup options</A>. </DL> <P> <H2><A NAME="SEC28" HREF="FILEUTIL.HTM#SEC28"><CODE>rm</CODE>: Remove files or directories</A></H2> <A NAME="IDX125"></A> <A NAME="IDX126"></A> <P> <CODE>rm</CODE> removes each given <VAR>file</VAR>. By default, it does not remove directories. Synopsis: <P> <PRE> rm [<VAR>option</VAR>]... [<VAR>file</VAR>]... </PRE> <A NAME="IDX127"></A> <P> If a file is unwritable, standard input is a terminal, and the <SAMP>`-f'</SAMP> or <SAMP>`--force'</SAMP> option is not given, or the <SAMP>`-i'</SAMP> or <SAMP>`--interactive'</SAMP> option <EM>is</EM> given, <CODE>rm</CODE> prompts the user for whether to remove the file. If the response does not begin with <SAMP>`y'</SAMP> or <SAMP>`Y'</SAMP>, the file is skipped. <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-d'</SAMP> <DD><DT><SAMP>`--directory'</SAMP> <DD>@opindex -d @opindex --directory <A NAME="IDX129"></A> <A NAME="IDX130"></A> <A NAME="IDX128"></A> Remove directories with <CODE>unlink</CODE> instead of <CODE>rmdir</CODE>, and don't require a directory to be empty before trying to unlink it. Only works if you have appropriate privileges. Because unlinking a directory causes any files in the deleted directory to become unreferenced, it is wise to <CODE>fsck</CODE> the filesystem after doing this. <DT><SAMP>`-f'</SAMP> <DD><DT><SAMP>`--force'</SAMP> <DD>@opindex -f @opindex --force Ignore nonexistent files and never prompt the user. <DT><SAMP>`-i'</SAMP> <DD><DT><SAMP>`--interactive'</SAMP> <DD>@opindex -i @opindex --interactive Prompt whether to remove each file. If the response does not begin with <SAMP>`y'</SAMP> or <SAMP>`Y'</SAMP>, the file is skipped. <DT><SAMP>`-r'</SAMP> <DD><DT><SAMP>`-R'</SAMP> <DD><DT><SAMP>`--recursive'</SAMP> <DD>@opindex -r @opindex -R @opindex --recursive <A NAME="IDX131"></A> Remove the contents of directories recursively. <DT><SAMP>`-v'</SAMP> <DD><DT><SAMP>`--verbose'</SAMP> <DD>@opindex -v @opindex --verbose Print the name of each file before removing it. </DL> <A NAME="IDX132"></A> <A NAME="IDX133"></A> <P> One common question is how to remove files whose names being with a <SAMP>`-'</SAMP>. GNU <CODE>rm</CODE>, like every program that uses the <CODE>getopt</CODE> function to parse its arguments, lets you use the <SAMP>`--'</SAMP> option to indicate that all following arguments are non-options. To remove a file called <TT>`-f'</TT> in the current directory, you could type either: <P> <PRE> rm -- -f </PRE> <P> or: <P> <PRE> rm ./-f </PRE> <P> @opindex - and Unix <CODE>rm</CODE> The Unix <CODE>rm</CODE> program's use of a single <SAMP>`-'</SAMP> for this purpose predates the development of the getopt standard syntax. <P> <H1><A NAME="SEC29" HREF="FILEUTIL.HTM#SEC29">Special file types</A></H1> <A NAME="IDX134"></A> <A NAME="IDX135"></A> <P> This chapter describes commands which create special types of files (and <CODE>rmdir</CODE>, which removes directories, one special file type). <A NAME="IDX136"></A> <A NAME="IDX137"></A> <P> Although Unix-like operating systems have markedly fewer special file types than others, not <EM>everything</EM> can be treated only as the undifferentiated byte stream of <DFN>normal files</DFN>. For example, when a file is created or removed, the system must record this information, which it does in a <DFN>directory</DFN>---a special type of file. Although you can read directories as normal files, if you're curious, in order for the system to do its job it must impose a structure, a certain order, on the bytes of the file. Thus it is a "special" type of file. <P> Besides directories, other special file types include named pipes (FIFOs), symbolic links, sockets, and so-called <DFN>special files</DFN>. <P> <H2><A NAME="SEC30" HREF="FILEUTIL.HTM#SEC30"><CODE>ln</CODE>: Make links between files</A></H2> <A NAME="IDX138"></A> <A NAME="IDX139"></A> <A NAME="IDX140"></A> <A NAME="IDX141"></A> <A NAME="IDX142"></A> <P> <A NAME="IDX143"></A> <P> <CODE>ln</CODE> makes links between files. By default, it makes hard links; with the <SAMP>`-s'</SAMP> option, it makes symbolic (or <DFN>soft</DFN>) links. Synopses: <P> <PRE> ln [<VAR>option</VAR>]... <VAR>source</VAR> [<VAR>dest</VAR>] ln [<VAR>option</VAR>]... <VAR>source</VAR>... <VAR>directory</VAR> </PRE> <P> If the last argument names an existing directory, <CODE>ln</CODE> links each <VAR>source</VAR> file into a file with the same name in that directory. (But see the description of the <SAMP>`--no-dereference'</SAMP> option below.) If only one file is given, it links that file into the current directory. Otherwise, if only two files are given, it links the first onto the second. It is an error if the last argument is not a directory and more than two files are given. By default, it does not remove existing files. <P> A <DFN>hard link</DFN> is another name for an existing file; the link and the original are indistinguishable. (Technically speaking, they share the same inode, and the inode contains all the information about a file--indeed, it is not incorrect to say that the inode <EM>is</EM> the file.) On all existing implementations, you cannot make a hard links to directories, and hard links cannot cross filesystem boundaries. (These restrictions are not mandated by POSIX, however.) <A NAME="IDX144"></A> <P> <DFN>Symbolic links</DFN> (<DFN>symlinks</DFN> for short), on the other hand, are a special file type (which not all kernels support; in particular, system V release 3 (and older) systems lack symlinks) in which the link file actually refers to a different file, by name. When most operations (opening, reading, writing, and so on) are passed the symbolic link file, the kernel automatically <DFN>dereferences</DFN> the link and operates on the target of the link. But some operations (e.g., removing) work on the link file itself, rather than on its target. See section `Symbolic Links' in <CITE>GNU C library</CITE>. <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-b'</SAMP> <DD><DT><SAMP>`--backup'</SAMP> <DD>@opindex -b @opindex --backup <A NAME="IDX145"></A> Make backups of files that are about to be overwritten or removed. See section <A HREF="FILEUTIL.000#SEC3">Backup options</A>. <DT><SAMP>`-d'</SAMP> <DD><DT><SAMP>`-F'</SAMP> <DD><DT><SAMP>`--directory'</SAMP> <DD>@opindex -d @opindex -F @opindex --directory <A NAME="IDX146"></A> Allow the super-user to make hard links to directories. <DT><SAMP>`-f'</SAMP> <DD><DT><SAMP>`--force'</SAMP> <DD>@opindex -f @opindex --force Remove existing destination files. <DT><SAMP>`-i'</SAMP> <DD><DT><SAMP>`--interactive'</SAMP> <DD>@opindex -i @opindex --interactive <A NAME="IDX147"></A> Prompt whether to remove existing destination files. <DT><SAMP>`-n'</SAMP> <DD><DT><SAMP>`--no-dereference'</SAMP> <DD>@opindex -n @opindex --no-dereference When used with <SAMP>`--force'</SAMP> and an explicit destination that is a symlink to a directory, remove (or move it with <SAMP>`--backup'</SAMP>) that symlink before making any link. When the destination is an actual directory (not a symlink to one), there is no ambiguity. The link is created in that directory. But when the specified destination is a symlink to a directory, there are two ways to treat the user's request. <CODE>ln</CODE> can treat the destination just as it would a normal directory and create the link in it. On the other hand, the destination can be viewed as a non-directory--as the symlink itself. In that case, <CODE>ln</CODE> must delete or backup that symlink before creating the new link. The default is to treat a destination that is a symlink to a directory just like a directory. <DT><SAMP>`-s'</SAMP> <DD><DT><SAMP>`--symbolic'</SAMP> <DD>@opindex -s @opindex --symbolic Make symbolic links instead of hard links. This option merely produces an error message on systems that do not support symbolic links. <DT><SAMP>`-v'</SAMP> <DD><DT><SAMP>`--verbose'</SAMP> <DD>@opindex -v @opindex --verbose Print the name of each file before linking it. <DT><SAMP>`-S <VAR>suffix</VAR>'</SAMP> <DD><DT><SAMP>`--suffix=<VAR>suffix</VAR>'</SAMP> <DD>@opindex -S @opindex --suffix Append <VAR>suffix</VAR> to each backup file made with <SAMP>`-b'</SAMP>. See section <A HREF="FILEUTIL.000#SEC3">Backup options</A>. <DT><SAMP>`-V <VAR>method</VAR>'</SAMP> <DD><DT><SAMP>`--version-control=<VAR>method</VAR>'</SAMP> <DD>@opindex -V @opindex --version-control Change the type of backups made with <SAMP>`-b'</SAMP>. The <VAR>method</VAR> argument can be <SAMP>`numbered'</SAMP> (or <SAMP>`t'</SAMP>), <SAMP>`existing'</SAMP> (or <SAMP>`nil'</SAMP>), or <SAMP>`never'</SAMP> (or <SAMP>`simple'</SAMP>). See section <A HREF="FILEUTIL.000#SEC3">Backup options</A>. </DL> <P> <H2><A NAME="SEC31" HREF="FILEUTIL.HTM#SEC31"><CODE>mkdir</CODE>: Make directories</A></H2> <A NAME="IDX148"></A> <A NAME="IDX149"></A> <A NAME="IDX150"></A> <P> <CODE>mkdir</CODE> creates directories with the specified names. Synopsis: <P> <PRE> mkdir [<VAR>option</VAR>]... <VAR>name</VAR>... </PRE> <P> It is not an error if a <VAR>name</VAR> is already a directory; <CODE>mkdir</CODE> simply proceeds. But if a <VAR>name</VAR> is an existing file and is anything but a directory, <CODE>mkdir</CODE> complains. <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-m <VAR>mode</VAR>'</SAMP> <DD><DT><SAMP>`--mode=<VAR>mode</VAR>'</SAMP> <DD>@opindex -m @opindex --mode <A NAME="IDX151"></A> Set the mode of created directories to <VAR>mode</VAR>, which is symbolic as in <CODE>chmod</CODE> and uses 0777 (read, write and execute allowed for everyone) minus the bits set in the umask for the point of the departure. See section <A HREF="FILEUTIL.000#SEC4">File permissions</A>. <DT><SAMP>`-p'</SAMP> <DD><DT><SAMP>`--parents'</SAMP> <DD>@opindex -p @opindex --parents <A NAME="IDX152"></A> Make any missing parent directories for each argument. The mode for parent directories is set to the umask modified by <SAMP>`u+wx'</SAMP>. Ignore arguments corresponding to existing directories. </DL> <P> <H2><A NAME="SEC32" HREF="FILEUTIL.HTM#SEC32"><CODE>mkfifo</CODE>: Make FIFOs (named pipes)</A></H2> <A NAME="IDX153"></A> <A NAME="IDX154"></A> <A NAME="IDX155"></A> <A NAME="IDX156"></A> <P> <CODE>mkfifo</CODE> creates FIFOs (also called <DFN>named pipes</DFN>) with the specified names. Synopsis: <P> <PRE> mkfifo [<VAR>option</VAR>] <VAR>name</VAR>... </PRE> <P> A <DFN>FIFO</DFN> is a special file type that permits independent processes to communicate. One process opens the FIFO file for writing, and another for reading, after which data can flow as with the usual anonymous pipe in shells or elsewhere. <P> The program accepts the following option. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-m <VAR>mode</VAR>'</SAMP> <DD><DT><SAMP>`--mode=<VAR>mode</VAR>'</SAMP> <DD>@opindex -m @opindex --mode <A NAME="IDX157"></A> Set the mode of created FIFOs to <VAR>mode</VAR>, which is symbolic as in <CODE>chmod</CODE> and uses 0666 (read and write allowed for everyone) minus the bits set in the umask for the point of departure. See section <A HREF="FILEUTIL.000#SEC4">File permissions</A>. </DL> <P> <H2><A NAME="SEC33" HREF="FILEUTIL.HTM#SEC33"><CODE>mknod</CODE>: Make block or character special files</A></H2> <A NAME="IDX158"></A> <A NAME="IDX159"></A> <A NAME="IDX160"></A> <P> <CODE>mknod</CODE> creates a FIFO, character special file, or block special file with the specified name. Synopsis: <P> <PRE> mknod [<VAR>option</VAR>]... <VAR>name</VAR> <VAR>type</VAR> [<VAR>major</VAR> <VAR>minor</VAR>] </PRE> <A NAME="IDX161"></A> <A NAME="IDX162"></A> <A NAME="IDX163"></A> <P> Unlike the phrase "special file type" above, the term <DFN>special file</DFN> has a technical meaning on Unix: something that can generate or receive data. Usually this corresponds to a physical piece of hardware, e.g., a printer or a disk. (These files are typically created at system-configuration time.) The <CODE>mknod</CODE> command is what creates files of this type. Such devices can be read either a character at a time or a "block" (many characters) at a time, hence we say there are <DFN>block special</DFN> files and <DFN>character special</DFN> files. <P> The arguments after <VAR>name</VAR> specify the type of file to make: <P> <DL COMPACT> <DT><SAMP>`p'</SAMP> <DD>@opindex p for FIFO file for a FIFO <DT><SAMP>`b'</SAMP> <DD>@opindex b for block special file for a block (buffered) special file <DT><SAMP>`c'</SAMP> <DD>@opindex c for character special file <A NAME="IDX164"></A> for a character (buffered) special file <DT><SAMP>`u'</SAMP> <DD>@opindex u for unbuffered character special file <A NAME="IDX165"></A> for a character (unbuffered) special file </DL> <P> When making a block or character special file, the major and minor device numbers must be given after the file type. <P> The program accepts the following option. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-m <VAR>mode</VAR>'</SAMP> <DD><DT><SAMP>`--mode=<VAR>mode</VAR>'</SAMP> <DD>@opindex -m @opindex --mode Set the mode of created files to <VAR>mode</VAR>, which is symbolic as in <CODE>chmod</CODE> and uses 0666 minus the bits set in the umask as the point of departure. See section <A HREF="FILEUTIL.000#SEC4">File permissions</A>. </DL> <P> <H2><A NAME="SEC34" HREF="FILEUTIL.HTM#SEC34"><CODE>rmdir</CODE>: Remove empty directories</A></H2> <A NAME="IDX166"></A> <A NAME="IDX167"></A> <A NAME="IDX168"></A> <P> <CODE>rmdir</CODE> removes empty directories. Synopsis: <P> <PRE> rmdir [<VAR>option</VAR>]... <VAR>directory</VAR>... </PRE> <P> If any <VAR>directory</VAR> argument does not refer to an existing empty directory, it is an error. <P> The program accepts the following option. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-p'</SAMP> <DD><DT><SAMP>`--parents'</SAMP> <DD>@opindex -p @opindex --parents <A NAME="IDX169"></A> Remove any parent directories that become empty after an argument <VAR>directory</VAR> is removed. </DL> <P> See section <A HREF="FILEUTIL.000#SEC28"><CODE>rm</CODE>: Remove files or directories</A>, for how to remove non-empty directories (recursively). <P> <H1><A NAME="SEC35" HREF="FILEUTIL.HTM#SEC35">Changing file attributes</A></H1> <A NAME="IDX170"></A> <A NAME="IDX171"></A> <A NAME="IDX172"></A> <P> Files are not merely contents, a name, and a file type (see section <A HREF="FILEUTIL.000#SEC29">Special file types</A>). They also have an owner (a userid), a group (a group id), permissions (what the owner can do with the file, what people in the group can do, and what everyone else can do), various timestamps, and other information. Collectively, we call all this a file's <DFN>attributes</DFN>. <P> These commands change file attributes. <P> <H2><A NAME="SEC36" HREF="FILEUTIL.HTM#SEC36"><CODE>chown</CODE>: Change file owner and group</A></H2> <A NAME="IDX173"></A> <A NAME="IDX174"></A> <A NAME="IDX175"></A> <A NAME="IDX176"></A> <A NAME="IDX177"></A> <P> <CODE>chown</CODE> changes the user and/or group ownership of each given file. Synopsis: <P> <PRE> chown [<VAR>option</VAR>]... <VAR>new-owner</VAR> <VAR>file</VAR>... </PRE> <P> The first non-option argument, <VAR>new-owner</VAR>, specifies the new owner and/or group, as follows (with no embedded white space): <P> <PRE> [<VAR>owner</VAR>] [ [:.] [<VAR>group</VAR>] ] </PRE> <P> Specifically: <P> <DL COMPACT> <DT><VAR>owner</VAR> <DD>If only an <VAR>owner</VAR> (a user name or numeric user id) is given, that user is made the owner of each given file, and the files' group is not changed. <DT><VAR>owner<SAMP>`.'</SAMP>group</VAR> <DD><DT><VAR>owner<SAMP>`:'</SAMP>group</VAR> <DD>If the <VAR>owner</VAR> is followed by a colon or dot and a <VAR>group</VAR> (a group name or numeric group id), with no spaces between them, the group ownership of the files is changed as well (to <VAR>group</VAR>). <DT><VAR>owner<SAMP>`.'</SAMP></VAR> <DD><DT><VAR>owner<SAMP>`:'</SAMP></VAR> <DD>If a colon or dot but no group name follows <VAR>owner</VAR>, that user is made the owner of the files and the group of the files is changed to <VAR>owner</VAR>'s login group. <DT><VAR><SAMP>`.'</SAMP>group</VAR> <DD><DT><VAR><SAMP>`:'</SAMP>group</VAR> <DD>If the colon or dot and following <VAR>group</VAR> are given, but the owner is omitted, only the group of the files is changed; in this case, <CODE>chown</CODE> performs the same function as <CODE>chgrp</CODE>. </DL> <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-c'</SAMP> <DD><DT><SAMP>`--changes'</SAMP> <DD>@opindex -c @opindex --changes <A NAME="IDX178"></A> Verbosely describe the action for each <VAR>file</VAR> whose ownership actually changes. <DT><SAMP>`-f'</SAMP> <DD><DT><SAMP>`--silent'</SAMP> <DD><DT><SAMP>`--quiet'</SAMP> <DD>@opindex -f @opindex --silent @opindex --quiet <A NAME="IDX179"></A> Do not print error messages about files whose ownership cannot be changed. <DT><SAMP>`-v'</SAMP> <DD><DT><SAMP>`--verbose'</SAMP> <DD>@opindex -v @opindex --verbose Verbosely describe the action (or non-action) taken for every <VAR>file</VAR>. <DT><SAMP>`-R'</SAMP> <DD><DT><SAMP>`--recursive'</SAMP> <DD>@opindex -R @opindex --recursive <A NAME="IDX180"></A> Recursively change ownership of directories and their contents. </DL> <P> <H2><A NAME="SEC37" HREF="FILEUTIL.HTM#SEC37"><CODE>chgrp</CODE>: Change group ownership</A></H2> <A NAME="IDX181"></A> <A NAME="IDX182"></A> <A NAME="IDX183"></A> <P> <CODE>chgrp</CODE> changes the group ownership of each given <VAR>file</VAR> to <VAR>group</VAR>, which can be either a group name or a numeric group id. Synopsis: <P> <PRE> chgrp [<VAR>option</VAR>]... <VAR>group</VAR> <VAR>file</VAR>... </PRE> <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-c'</SAMP> <DD><DT><SAMP>`--changes'</SAMP> <DD>@opindex -c @opindex --changes <A NAME="IDX184"></A> Verbosely describe the action for each <VAR>file</VAR> whose group actually changes. <DT><SAMP>`-f'</SAMP> <DD><DT><SAMP>`--silent'</SAMP> <DD><DT><SAMP>`--quiet'</SAMP> <DD>@opindex -f @opindex --silent @opindex --quiet <A NAME="IDX185"></A> Do not print error messages about files whose group cannot be changed. <DT><SAMP>`-v'</SAMP> <DD><DT><SAMP>`--verbose'</SAMP> <DD>@opindex -v @opindex --verbose Verbosely describe the action or non-action taken for every <VAR>file</VAR>. <DT><SAMP>`-R'</SAMP> <DD><DT><SAMP>`--recursive'</SAMP> <DD>@opindex -R @opindex --recursive <A NAME="IDX186"></A> Recursively change the group ownership of directories and their contents. </DL> <P> <H2><A NAME="SEC38" HREF="FILEUTIL.HTM#SEC38"><CODE>chmod</CODE>: Change access permissions</A></H2> <A NAME="IDX187"></A> <A NAME="IDX188"></A> <A NAME="IDX189"></A> <A NAME="IDX190"></A> <P> <CODE>chmod</CODE> changes the access permissions of the named files. Synopsis: <P> <PRE> chmod [<VAR>option</VAR>]... <VAR>mode</VAR> <VAR>file</VAR>... </PRE> <A NAME="IDX191"></A> <P> <CODE>chmod</CODE> never changes the permissions of symbolic links, since the <CODE>chmod</CODE> system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, <CODE>chmod</CODE> changes the permissions of the pointed-to file. In contrast, <CODE>chmod</CODE> ignores symbolic links encountered during recursive directory traversals. <P> The first non-option argument, <VAR>mode</VAR>, specifies the new permissions. See the section below for details. <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-c'</SAMP> <DD><DT><SAMP>`--changes'</SAMP> <DD>@opindex -c @opindex --changes Verbosely describe the action for each <VAR>file</VAR> whose permissions actually changes. <DT><SAMP>`-f'</SAMP> <DD><DT><SAMP>`--silent'</SAMP> <DD><DT><SAMP>`--quiet'</SAMP> <DD>@opindex -f @opindex --silent @opindex --quiet <A NAME="IDX192"></A> Do not print error messages about files whose permissions cannot be changed. <DT><SAMP>`-v'</SAMP> <DD><DT><SAMP>`--verbose'</SAMP> <DD>@opindex -v @opindex --verbose Verbosely describe the action or non-action taken for every <VAR>file</VAR>. <DT><SAMP>`-R'</SAMP> <DD><DT><SAMP>`--recursive'</SAMP> <DD>@opindex -R @opindex --recursive <A NAME="IDX193"></A> Recursively change permissions of directories and their contents. </DL> <P> <H2><A NAME="SEC39" HREF="FILEUTIL.HTM#SEC39"><CODE>touch</CODE>: Change file timestamps</A></H2> <A NAME="IDX194"></A> <A NAME="IDX195"></A> <A NAME="IDX196"></A> <A NAME="IDX197"></A> <P> <CODE>touch</CODE> changes the access and/or modification times of the specified files. Synopsis: <P> <PRE> touch [<VAR>option</VAR>]... <VAR>file</VAR>... </PRE> <P> If the first <VAR>file</VAR> would be a valid argument to the <SAMP>`-t'</SAMP> option and no timestamp is given with any of the <SAMP>`-d'</SAMP>, <SAMP>`-r'</SAMP>, or <SAMP>`-t'</SAMP> options and the <SAMP>`--'</SAMP> argument is not given, that argument is interpreted as the time for the other files instead of as a filename. <A NAME="IDX198"></A> <P> Any <VAR>file</VAR> that does not exist is created empty. <A NAME="IDX199"></A> <P> If changing both the access and modification times to the current time, <CODE>touch</CODE> can change the timestamps for files that the user running it does not own but has write permission for. Otherwise, the user must own the files. <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-a'</SAMP> <DD><DT><SAMP>`--time=atime'</SAMP> <DD><DT><SAMP>`--time=access'</SAMP> <DD><DT><SAMP>`--time=use'</SAMP> <DD>@opindex -a @opindex --time @opindex atime, changing @opindex access time, changing @opindex use time, changing Change the access time only. <DT><SAMP>`-c'</SAMP> <DD><DT><SAMP>`--no-create'</SAMP> <DD>@opindex -c @opindex --no-create Do not create files that do not exist. <DT><SAMP>`-d'</SAMP> <DD><DT><SAMP>`--date=time'</SAMP> <DD>@opindex -d @opindex --date @opindex time Use <VAR>time</VAR> instead of the current time. It can contain month names, timezones, <SAMP>`am'</SAMP> and <SAMP>`pm'</SAMP>, etc. See section `date invocation' in <CITE>Shell utilities</CITE>. <DT><SAMP>`-f'</SAMP> <DD>Ignored; for compatibility with BSD versions of <CODE>touch</CODE>. <DT><SAMP>`-m'</SAMP> <DD><DT><SAMP>`--time=mtime'</SAMP> <DD><DT><SAMP>`--time=modify'</SAMP> <DD>@opindex -m @opindex --time @opindex mtime, changing @opindex modify time, changing Change the modification time only. <DT><SAMP>`-r <VAR>reference-file</VAR>'</SAMP> <DD><DT><SAMP>`--file=<VAR>reference-file</VAR>'</SAMP> <DD>@opindex -r @opindex --file Use the times of <VAR>reference-file</VAR> instead of the current time. <DT><SAMP>`-t MMDDhhmm[[CC]YY][.ss]'</SAMP> <DD>Use the argument (months, days, hours, minutes, optional century and years, optional seconds) instead of the current time. </DL> <P> <H1><A NAME="SEC40" HREF="FILEUTIL.HTM#SEC40">Disk usage</A></H1> <A NAME="IDX200"></A> <P> No disk can hold an infinite amount of data. These commands report on how much disk storage is in use or available. (This has nothing much to do with how much <EM>main memory</EM>, i.e., RAM, a program is using when it runs; for that, you want <CODE>ps</CODE> or <CODE>pstat</CODE> or <CODE>swap</CODE> or some such command.) <P> <H2><A NAME="SEC41" HREF="FILEUTIL.HTM#SEC41"><CODE>df</CODE>: Report filesystem disk space usage</A></H2> <A NAME="IDX201"></A> <A NAME="IDX202"></A> <A NAME="IDX203"></A> <P> <CODE>df</CODE> reports the amount of disk space used and available on filesystems. Synopsis: <P> <PRE> df [<VAR>option</VAR>]... [<VAR>file</VAR>]... </PRE> <P> With no arguments, <CODE>df</CODE> reports the space used and available on all currently mounted filesystems (of all types). Otherwise, <CODE>df</CODE> reports on the filesystem containing each argument <VAR>file</VAR>. <A NAME="IDX204"></A> <P> Disk space is shown in 1024-byte blocks by default, unless the environment variable <CODE>POSIXLY_CORRECT</CODE> is set, in which case 512-byte blocks are used (unless the <SAMP>`-k'</SAMP> option is given). <A NAME="IDX205"></A> <A NAME="IDX206"></A> <P> If an argument <VAR>file</VAR> is a disk device file containing a mounted filesystem, <CODE>df</CODE> shows the space available on that filesystem rather than on the filesystem containing the device node (i.e., the root filesystem). GNU <CODE>df</CODE> does not attempt to determine the disk usage on unmounted filesystems, because on most kinds of systems doing so requires extremely nonportable intimate knowledge of filesystem structures. <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-a'</SAMP> <DD><DT><SAMP>`--all'</SAMP> <DD>@opindex -a @opindex --all <A NAME="IDX208"></A> <A NAME="IDX207"></A> Include in the listing filesystems that have 0 blocks, which are omitted by default. Such filesystems are typically special-purpose pseudo-filesystems, such as automounter entries. Filesystems of type "ignore" or "auto", supported by some operating systems, are only included in the listing if this option is specified. <DT><SAMP>`-i'</SAMP> <DD><DT><SAMP>`--inodes'</SAMP> <DD>@opindex -i @opindex --inodes <A NAME="IDX209"></A> List inode usage information instead of block usage. An inode (short for index node) is contains information about a file such as its owner, permissions, timestamps, and location on the disk. <DT><SAMP>`-k'</SAMP> <DD><DT><SAMP>`--kilobytes'</SAMP> <DD>@opindex -k @opindex --kilobytes <A NAME="IDX210"></A> Print sizes in 1024-byte blocks. This overrides the environment variable <CODE>POSIXLY_CORRECT</CODE>. <DT><SAMP>`--no-sync'</SAMP> <DD>@opindex --no-sync <A NAME="IDX211"></A> Do not invoke the <CODE>sync</CODE> system call before getting any usage data. This may make <CODE>df</CODE> run significantly faster on systems with many disks, but on some systems the results may be slightly out of date. <DT><SAMP>`-P'</SAMP> <DD><DT><SAMP>`--portability'</SAMP> <DD>@opindex -P @opindex --portability <A NAME="IDX213"></A> <A NAME="IDX214"></A> <A NAME="IDX215"></A> <A NAME="IDX212"></A> Use the POSIX output format. This is like the default format except that the information about each filesystem is always printed on exactly one line; a mount device is never put on a line by itself. This means that if the mount device name is more than 20 characters long (e.g., for some network mounts), the columns are misaligned. <DT><SAMP>`--sync'</SAMP> <DD>@opindex --sync <A NAME="IDX216"></A> Invoke the <CODE>sync</CODE> system call before getting any usage data. On some systems, doing this yields more up to date results, but in general this option makes <CODE>df</CODE> much slower, especially when there are many or very busy filesystems. <DT><SAMP>`-t <VAR>fstype</VAR>'</SAMP> <DD><DT><SAMP>`--type=<VAR>fstype</VAR>'</SAMP> <DD>@opindex -t @opindex --type <A NAME="IDX217"></A> Limit the listing to filesystems of type <VAR>fstype</VAR>. Multiple filesystem types can be specified by giving multiple <SAMP>`-t'</SAMP> options. By default, nothing is omitted. <DT><SAMP>`-T'</SAMP> <DD><DT><SAMP>`--print-type'</SAMP> <DD>@opindex -T @opindex --print-type <A NAME="IDX218"></A> Print each filesystem's type. The types printed here are the same ones you can include or exclude with <SAMP>`-t'</SAMP> and <SAMP>`-x'</SAMP>. The particular types printed are whatever is supported by the system. Here are some of the common names (this list is certainly not exhaustive): <DL COMPACT> <A NAME="IDX219"></A> <DT><SAMP>`nfs'</SAMP> <DD>An NFS filesystem, i.e., one mounted over a network from another machine. This is the one type name which seems to be used uniformly by all systems. <A NAME="IDX220"></A> <A NAME="IDX221"></A> <DT><SAMP>`4.2, ufs, efs...'</SAMP> <DD>@opindex 4.2 filesystem type @opindex ufs filesystem type @opindex efs filesystem type A filesystem on a locally-mounted hard disk. (The system might even support more than one type here; Linux does.) <A NAME="IDX222"></A> <A NAME="IDX223"></A> <DT><SAMP>`hsfs, cdfs'</SAMP> <DD>@opindex hsfs filesystem type @opindex cdfs filesystem type A filesystem on a CD-ROM drive. HP-UX uses <SAMP>`cdfs'</SAMP>, most other systems use <SAMP>`hsfs'</SAMP> (<SAMP>`hs'</SAMP> for `High Sierra'). <A NAME="IDX224"></A> <A NAME="IDX225"></A> <A NAME="IDX226"></A> <A NAME="IDX227"></A> <DT><SAMP>`pcfs'</SAMP> <DD>@opindex pcfs An MS-DOS filesystem, usually on a diskette. </DL> <DT><SAMP>`-x <VAR>fstype</VAR>'</SAMP> <DD><DT><SAMP>`--exclude-type=<VAR>fstype</VAR>'</SAMP> <DD>@opindex -x @opindex --exclude-type Limit the listing to filesystems not of type <VAR>fstype</VAR>. Multiple filesystem types can be eliminated by giving multiple <SAMP>`-x'</SAMP> options. By default, no filesystem types are omitted. <DT><SAMP>`-v'</SAMP> <DD>Ignored; for compatibility with System V versions of <CODE>df</CODE>. </DL> <P> <H2><A NAME="SEC42" HREF="FILEUTIL.HTM#SEC42"><CODE>du</CODE>: Estimate file space usage</A></H2> <A NAME="IDX228"></A> <A NAME="IDX229"></A> <A NAME="IDX230"></A> <P> <CODE>du</CODE> reports the amount of disk space used by the specified files and for each subdirectory (of directory arguments). Synopsis: <P> <PRE> du [<VAR>option</VAR>]... [<VAR>file</VAR>]... </PRE> <P> With no arguments, <CODE>du</CODE> reports the disk space for the current directory. The output is in 1024-byte units by default, unless the environment variable <CODE>POSIXLY_CORRECT</CODE> is set, in which case 512-byte blocks are used (unless <SAMP>`-k'</SAMP> is specified). <P> The program accepts the following options. Also see section <A HREF="FILEUTIL.000#SEC2">Common options</A>. <P> <DL COMPACT> <DT><SAMP>`-a'</SAMP> <DD><DT><SAMP>`--all'</SAMP> <DD>@opindex -a @opindex --all Show counts for all files, not just directories. <DT><SAMP>`-b'</SAMP> <DD><DT><SAMP>`--bytes'</SAMP> <DD>@opindex -b @opindex --bytes Print sizes in bytes, instead of kilobytes. <DT><SAMP>`-c'</SAMP> <DD><DT><SAMP>`--total'</SAMP> <DD>@opindex -c @opindex --total <A NAME="IDX231"></A> Print a grand total of all arguments after all arguments have been processed. This can be used to find out the total disk usage of a given set of files or directories. <DT><SAMP>`-D'</SAMP> <DD><DT><SAMP>`--dereference-args'</SAMP> <DD>@opindex -D @opindex --dereference-args Dereference symbolic links that are command line arguments. Does not affect other symbolic links. This is helpful for finding out the disk usage of directories, such as <TT>`/usr/tmp'</TT>, which are often symbolic links. <DT><SAMP>`-k'</SAMP> <DD><DT><SAMP>`--kilobytes'</SAMP> <DD>@opindex -k @opindex --kilobytes <A NAME="IDX232"></A> Print sizes in kilobytes. This overrides the environment variable <CODE>POSIXLY_CORRECT</CODE>. <DT><SAMP>`-l'</SAMP> <DD><DT><SAMP>`--count-links'</SAMP> <DD>@opindex -l @opindex --count-links Count the size of all files, even if they have appeared already (as a hard link). <DT><SAMP>`-L'</SAMP> <DD><DT><SAMP>`--dereference'</SAMP> <DD>@opindex -L @opindex --dereference Dereference symbolic links (show the disk space used by the file or directory that the link points to instead of the space used by the link). <DT><SAMP>`-s'</SAMP> <DD><DT><SAMP>`--summarize'</SAMP> <DD>@opindex -s @opindex --summarize Display only a total for each argument. <DT><SAMP>`-S'</SAMP> <DD><DT><SAMP>`--separate-dirs'</SAMP> <DD>@opindex -S @opindex --separate-dirs Report the size of each directory separately, not including the sizes of subdirectories. <DT><SAMP>`-x'</SAMP> <DD><DT><SAMP>`--one-file-system'</SAMP> <DD>@opindex -x @opindex --one-file-system <A NAME="IDX233"></A> Skip directories that are on different filesystems from the one that the argument being processed is on. </DL> <A NAME="IDX234"></A> <P> On BSD systems, <CODE>du</CODE> reports sizes that are half the correct values for files that are NFS-mounted from HP-UX systems. On HP-UX systems, it reports sizes that are twice the correct values for files that are NFS-mounted from BSD systems. This is due to a flaw in HP-UX; it also affects the HP-UX <CODE>du</CODE> program. <P> <H2><A NAME="SEC43" HREF="FILEUTIL.HTM#SEC43"><CODE>sync</CODE>: Synchronize data on disk with memory</A></H2> <A NAME="IDX235"></A> <A NAME="IDX236"></A> <P> <A NAME="IDX237"></A> <A NAME="IDX238"></A> <P> <CODE>sync</CODE> writes any data buffered in memory out to disk. This can include (but is not limited to) modified superblocks, modified inodes, and delayed reads and writes. This must be implemented by the kernel; The <CODE>sync</CODE> program does nothing but exercise the <CODE>sync</CODE> system call. <A NAME="IDX239"></A> <P> The kernel keeps data in memory to avoid doing (relatively slow) disk reads and writes. This improves performance, but if the computer crashes, data may be lost or the filesystem corrupted as a result. <CODE>sync</CODE> ensures everything in memory is written to disk. <P> Any arguments are ignored, except for a lone <SAMP>`--help'</SAMP> or <SAMP>`--version'</SAMP> (see section <A HREF="FILEUTIL.000#SEC2">Common options</A>). <P> <H1><A NAME="SEC44" HREF="FILEUTIL.HTM#SEC44">Index</A></H1> <P> <H2>-</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX133"><SAMP>`-'</SAMP>, removing files beginning with</A> </DIR> <H2>a</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX189">access permissions, changing</A> <LI><A HREF="FILEUTIL.000#IDX32">adding permissions</A> <LI><A HREF="FILEUTIL.000#IDX27">append-only directories</A> <LI><A HREF="FILEUTIL.000#IDX115">appropriate privileges</A> <LI><A HREF="FILEUTIL.000#IDX172">attributes, file</A> <LI><A HREF="FILEUTIL.000#IDX207">automounter filesystems</A> </DIR> <H2>b</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX69">backslash sequences for filenames</A> <LI><A HREF="FILEUTIL.000#IDX52">backup files, ignoring</A> <LI><A HREF="FILEUTIL.000#IDX13">backup files, type made</A> <LI><A HREF="FILEUTIL.000#IDX8">backup options</A> <LI><A HREF="FILEUTIL.000#IDX10">backup suffix</A> <LI><A HREF="FILEUTIL.000#IDX145">backups, making</A> <LI><A HREF="FILEUTIL.000#IDX100">block size</A> <LI><A HREF="FILEUTIL.000#IDX101">block size of conversion</A> <LI><A HREF="FILEUTIL.000#IDX96">block size of input</A> <LI><A HREF="FILEUTIL.000#IDX98">block size of output</A> <LI><A HREF="FILEUTIL.000#IDX162">block special files</A> <LI><A HREF="FILEUTIL.000#IDX159">block special files, creating</A> <LI><A HREF="FILEUTIL.000#IDX164">buffered character file</A> <LI><A HREF="FILEUTIL.000#IDX3">bugs, reporting</A> <LI><A HREF="FILEUTIL.000#IDX103">byte-swapping</A> </DIR> <H2>c</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX222">CD-ROM filesystem type</A> <LI><A HREF="FILEUTIL.000#IDX184">changed files, verbosely describing</A> <LI><A HREF="FILEUTIL.000#IDX178">changed owners, verbosely describing</A> <LI><A HREF="FILEUTIL.000#IDX188">changing access permissions</A> <LI><A HREF="FILEUTIL.000#IDX170">changing file attributes</A> <LI><A HREF="FILEUTIL.000#IDX176">changing file ownership</A> <LI><A HREF="FILEUTIL.000#IDX195">changing file timestamps</A> <LI><A HREF="FILEUTIL.000#IDX183">changing group ownership</A> <LI><A HREF="FILEUTIL.000#IDX41">changing special permissions</A> <LI><A HREF="FILEUTIL.000#IDX163">character special files</A> <LI><A HREF="FILEUTIL.000#IDX160">character special files, creating</A> <LI><A HREF="FILEUTIL.000#IDX181">chgrp</A> <LI><A HREF="FILEUTIL.000#IDX187">chmod</A> <LI><A HREF="FILEUTIL.000#IDX173">chown</A> <LI><A HREF="FILEUTIL.000#IDX68">COLUMNS</A> <LI><A HREF="FILEUTIL.000#IDX5">common options</A> <LI><A HREF="FILEUTIL.000#IDX42">conditional executability</A> <LI><A HREF="FILEUTIL.000#IDX102">converstion block size</A> <LI><A HREF="FILEUTIL.000#IDX94">converting while copying a file</A> <LI><A HREF="FILEUTIL.000#IDX87">copying directories recursively</A> <LI><A HREF="FILEUTIL.000#IDX39">copying existing permissions</A> <LI><A HREF="FILEUTIL.000#IDX76">copying files and directories</A> <LI><A HREF="FILEUTIL.000#IDX107">copying files and setting attributes</A> <LI><A HREF="FILEUTIL.000#IDX75">cp</A> <LI><A HREF="FILEUTIL.000#IDX239">crashes and corruption</A> <LI><A HREF="FILEUTIL.000#IDX150">creating directories</A> <LI><A HREF="FILEUTIL.000#IDX156">creating FIFOs (named pipes)</A> <LI><A HREF="FILEUTIL.000#IDX142">creating links (hard or soft)</A> </DIR> <H2>d</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX93">dd</A> <LI><A HREF="FILEUTIL.000#IDX144">dereferencing symbolic links</A> <LI><A HREF="FILEUTIL.000#IDX206">device file, disk</A> <LI><A HREF="FILEUTIL.000#IDX201">df</A> <LI><A HREF="FILEUTIL.000#IDX70">dir</A> <LI><A HREF="FILEUTIL.000#IDX78">directories, copying</A> <LI><A HREF="FILEUTIL.000#IDX86">directories, copying recursively</A> <LI><A HREF="FILEUTIL.000#IDX149">directories, creating</A> <LI><A HREF="FILEUTIL.000#IDX109">directories, creating with given attributes</A> <LI><A HREF="FILEUTIL.000#IDX131">directories, removing (recursively)</A> <LI><A HREF="FILEUTIL.000#IDX168">directories, removing empty</A> <LI><A HREF="FILEUTIL.000#IDX128">directories, removing with <CODE>unlink</CODE></A> <LI><A HREF="FILEUTIL.000#IDX51">directory listing</A> <LI><A HREF="FILEUTIL.000#IDX71">directory listing, brief</A> <LI><A HREF="FILEUTIL.000#IDX55">directory listing, recursive</A> <LI><A HREF="FILEUTIL.000#IDX73">directory listing, verbose</A> <LI><A HREF="FILEUTIL.000#IDX56">dired Emacs mode support</A> <LI><A HREF="FILEUTIL.000#IDX205">disk device file</A> <LI><A HREF="FILEUTIL.000#IDX200">disk usage</A> <LI><A HREF="FILEUTIL.000#IDX203">disk usage by filesystem</A> <LI><A HREF="FILEUTIL.000#IDX230">disk usage for files</A> <LI><A HREF="FILEUTIL.000#IDX227">diskette filesystem</A> <LI><A HREF="FILEUTIL.000#IDX225">DOS filesystem</A> <LI><A HREF="FILEUTIL.000#IDX228">du</A> </DIR> <H2>e</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX198">empty files, creating</A> <LI><A HREF="FILEUTIL.000#IDX192">error messages, omitting</A> <LI><A HREF="FILEUTIL.000#IDX64">executables and file type, marking</A> <LI><A HREF="FILEUTIL.000#IDX19">execute permission</A> <LI><A HREF="FILEUTIL.000#IDX38">execute permission, symbolic</A> </DIR> <H2>f</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX154">FIFOs, creating</A> <LI><A HREF="FILEUTIL.000#IDX171">file attributes, changing</A> <LI><A HREF="FILEUTIL.000#IDX84">file information, preserving</A> <LI><A HREF="FILEUTIL.000#IDX174">file ownership, changing</A> <LI><A HREF="FILEUTIL.000#IDX15">file permissions</A> <LI><A HREF="FILEUTIL.000#IDX48">file permissions, numeric</A> <LI><A HREF="FILEUTIL.000#IDX229">file space usage</A> <LI><A HREF="FILEUTIL.000#IDX196">file timestamps, changing</A> <LI><A HREF="FILEUTIL.000#IDX63">file type and executables, marking</A> <LI><A HREF="FILEUTIL.000#IDX67">file type, marking</A> <LI><A HREF="FILEUTIL.000#IDX137">file types</A> <LI><A HREF="FILEUTIL.000#IDX135">file types, special</A> <LI><A HREF="FILEUTIL.000#IDX132">files beginning with <SAMP>`-'</SAMP>, removing</A> <LI><A HREF="FILEUTIL.000#IDX77">files, copying</A> <LI><A HREF="FILEUTIL.000#IDX202">filesystem disk usage</A> <LI><A HREF="FILEUTIL.000#IDX216">filesystem space, retrieving current data more slowly</A> <LI><A HREF="FILEUTIL.000#IDX211">filesystem space, retrieving old data more quickly</A> <LI><A HREF="FILEUTIL.000#IDX217">filesystem types, limiting output to certain</A> <LI><A HREF="FILEUTIL.000#IDX218">filesystem types, printing</A> <LI><A HREF="FILEUTIL.000#IDX143">filesystems and hard links</A> <LI><A HREF="FILEUTIL.000#IDX92">filesystems, omitting copying to different</A> <LI><A HREF="FILEUTIL.000#IDX130">fsck</A> </DIR> <H2>g</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX46">giving away permissions</A> <LI><A HREF="FILEUTIL.000#IDX231">grand total of disk space</A> <LI><A HREF="FILEUTIL.000#IDX21">group owner, default</A> <LI><A HREF="FILEUTIL.000#IDX112">group ownership of installed files, setting</A> <LI><A HREF="FILEUTIL.000#IDX182">group ownership, changing</A> <LI><A HREF="FILEUTIL.000#IDX175">group ownerships, changing</A> <LI><A HREF="FILEUTIL.000#IDX30">group, permissions for</A> </DIR> <H2>h</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX146">hard links to directories</A> <LI><A HREF="FILEUTIL.000#IDX140">hard links, creating</A> <LI><A HREF="FILEUTIL.000#IDX83">hard links, preserving</A> <LI><A HREF="FILEUTIL.000#IDX6">help, online</A> <LI><A HREF="FILEUTIL.000#IDX223">High Sierra filesystem</A> <LI><A HREF="FILEUTIL.000#IDX4">history</A> <LI><A HREF="FILEUTIL.000#IDX79">holes, copying</A> </DIR> <H2>i</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX208">ignore filesystems</A> <LI><A HREF="FILEUTIL.000#IDX57">inode number, printing</A> <LI><A HREF="FILEUTIL.000#IDX209">inode usage</A> <LI><A HREF="FILEUTIL.000#IDX238">inodes, written buffered</A> <LI><A HREF="FILEUTIL.000#IDX97">input block size</A> <LI><A HREF="FILEUTIL.000#IDX106">install</A> <LI><A HREF="FILEUTIL.000#IDX1">introduction</A> </DIR> <H2>l</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX111">leading directories, creating missing</A> <LI><A HREF="FILEUTIL.000#IDX139">links, creating</A> <LI><A HREF="FILEUTIL.000#IDX220">Linux filesystem types</A> <LI><A HREF="FILEUTIL.000#IDX138">ln</A> <LI><A HREF="FILEUTIL.000#IDX221">local filesystem types</A> <LI><A HREF="FILEUTIL.000#IDX50">ls</A> </DIR> <H2>m</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX108">Makefiles, installing programs in</A> <LI><A HREF="FILEUTIL.000#IDX74">manipulating files</A> <LI><A HREF="FILEUTIL.000#IDX148">mkdir</A> <LI><A HREF="FILEUTIL.000#IDX153">mkfifo</A> <LI><A HREF="FILEUTIL.000#IDX158">mknod</A> <LI><A HREF="FILEUTIL.000#IDX45">modes and umask</A> <LI><A HREF="FILEUTIL.000#IDX151">modes of created directories, setting</A> <LI><A HREF="FILEUTIL.000#IDX157">modes of created FIFOs, setting</A> <LI><A HREF="FILEUTIL.000#IDX226">MS-DOS filesystem</A> <LI><A HREF="FILEUTIL.000#IDX43">multiple changes to permissions</A> <LI><A HREF="FILEUTIL.000#IDX95">multipliers after numbers</A> <LI><A HREF="FILEUTIL.000#IDX119">mv</A> </DIR> <H2>n</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX155">named pipes, creating</A> <LI><A HREF="FILEUTIL.000#IDX91">newer files, copying only</A> <LI><A HREF="FILEUTIL.000#IDX124">newer files, moving only</A> <LI><A HREF="FILEUTIL.000#IDX219">NFS filesystem type</A> <LI><A HREF="FILEUTIL.000#IDX234">NFS mounts from BSD to HP-UX</A> <LI><A HREF="FILEUTIL.000#IDX89">non-directories, copying as special files</A> <LI><A HREF="FILEUTIL.000#IDX47">numeric modes</A> <LI><A HREF="FILEUTIL.000#IDX66">numeric uid and gid</A> </DIR> <H2>o</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX49">octal numbers for file modes</A> <LI><A HREF="FILEUTIL.000#IDX233">one filesystem, restricting <CODE>du</CODE> to</A> <LI><A HREF="FILEUTIL.000#IDX212">one-line output format</A> <LI><A HREF="FILEUTIL.000#IDX31">other permissions</A> <LI><A HREF="FILEUTIL.000#IDX99">output block size</A> <LI><A HREF="FILEUTIL.000#IDX215">output format, portable</A> <LI><A HREF="FILEUTIL.000#IDX29">owner of file, permissions for</A> <LI><A HREF="FILEUTIL.000#IDX20">owner, default</A> <LI><A HREF="FILEUTIL.000#IDX114">ownership of installed files, setting</A> </DIR> <H2>p</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX85">parent directories and <CODE>cp</CODE></A> <LI><A HREF="FILEUTIL.000#IDX152">parent directories, creating</A> <LI><A HREF="FILEUTIL.000#IDX110">parent directories, creating missing</A> <LI><A HREF="FILEUTIL.000#IDX169">parent directories, removing</A> <LI><A HREF="FILEUTIL.000#IDX224">PC filesystem</A> <LI><A HREF="FILEUTIL.000#IDX16">permissions of files</A> <LI><A HREF="FILEUTIL.000#IDX113">permissions of installed files, setting</A> <LI><A HREF="FILEUTIL.000#IDX190">permissions, changing access</A> <LI><A HREF="FILEUTIL.000#IDX40">permissions, copying existing</A> <LI><A HREF="FILEUTIL.000#IDX199">permissions, for changing file timestamps</A> <LI><A HREF="FILEUTIL.000#IDX214">portable output format</A> <LI><A HREF="FILEUTIL.000#IDX213">POSIX output format</A> <LI><A HREF="FILEUTIL.000#IDX2">POSIX.2</A> <LI><A HREF="FILEUTIL.000#IDX204">POSIXLY_CORRECT</A> <LI><A HREF="FILEUTIL.000#IDX210">POSIXLY_CORRECT, overridden by <CODE>df -k</CODE></A> <LI><A HREF="FILEUTIL.000#IDX232">POSIXLY_CORRECT, overridden by <CODE>du -k</CODE></A> <LI><A HREF="FILEUTIL.000#IDX65">POSIXLY_CORRECT, overridden by <CODE>ls -k</CODE></A> <LI><A HREF="FILEUTIL.000#IDX59">POSIXLY_CORRECT, overrides <CODE>ls -s</CODE></A> <LI><A HREF="FILEUTIL.000#IDX147">prompting, and <CODE>ln</CODE></A> <LI><A HREF="FILEUTIL.000#IDX120">prompting, and <CODE>mv</CODE></A> <LI><A HREF="FILEUTIL.000#IDX127">prompting, and <CODE>rm</CODE></A> <LI><A HREF="FILEUTIL.000#IDX123">prompts, forcing</A> <LI><A HREF="FILEUTIL.000#IDX122">prompts, omitting</A> </DIR> <H2>r</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX104">read errors, ignoring</A> <LI><A HREF="FILEUTIL.000#IDX17">read permission</A> <LI><A HREF="FILEUTIL.000#IDX36">read permission, symbolic</A> <LI><A HREF="FILEUTIL.000#IDX80">read system call, and holes</A> <LI><A HREF="FILEUTIL.000#IDX54">recursive directory listing</A> <LI><A HREF="FILEUTIL.000#IDX193">recursively changing access permissions</A> <LI><A HREF="FILEUTIL.000#IDX180">recursively changing file ownership</A> <LI><A HREF="FILEUTIL.000#IDX186">recursively changing group ownership</A> <LI><A HREF="FILEUTIL.000#IDX88">recursively copying directories</A> <LI><A HREF="FILEUTIL.000#IDX167">removing empty directories</A> <LI><A HREF="FILEUTIL.000#IDX126">removing files or directories</A> <LI><A HREF="FILEUTIL.000#IDX33">removing permissions</A> <LI><A HREF="FILEUTIL.000#IDX62">reverse sorting</A> <LI><A HREF="FILEUTIL.000#IDX125">rm</A> <LI><A HREF="FILEUTIL.000#IDX166">rmdir</A> <LI><A HREF="FILEUTIL.000#IDX116">root as default owner</A> </DIR> <H2>s</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX23">setgid</A> <LI><A HREF="FILEUTIL.000#IDX35">setting permissions</A> <LI><A HREF="FILEUTIL.000#IDX22">setuid</A> <LI><A HREF="FILEUTIL.000#IDX11">SIMPLE_BACKUP_SUFFIX</A> <LI><A HREF="FILEUTIL.000#IDX58">size of files, reporting</A> <LI><A HREF="FILEUTIL.000#IDX61">sorting <CODE>ls</CODE> output</A> <LI><A HREF="FILEUTIL.000#IDX136">special file types</A> <LI><A HREF="FILEUTIL.000#IDX161">special files</A> <LI><A HREF="FILEUTIL.000#IDX24">sticky</A> <LI><A HREF="FILEUTIL.000#IDX118">stripping symbol table information</A> <LI><A HREF="FILEUTIL.000#IDX34">subtracting permissions</A> <LI><A HREF="FILEUTIL.000#IDX237">superblock, writing</A> <LI><A HREF="FILEUTIL.000#IDX25">swap space, saving text image in</A> <LI><A HREF="FILEUTIL.000#IDX117">symbol table information, stripping</A> <LI><A HREF="FILEUTIL.000#IDX141">symbolic (soft) links, creating</A> <LI><A HREF="FILEUTIL.000#IDX82">symbolic links, copying</A> <LI><A HREF="FILEUTIL.000#IDX90">symbolic links, copying with</A> <LI><A HREF="FILEUTIL.000#IDX53">symbolic links, dereferencing</A> <LI><A HREF="FILEUTIL.000#IDX191">symbolic links, permissions of</A> <LI><A HREF="FILEUTIL.000#IDX28">symbolic modes</A> <LI><A HREF="FILEUTIL.000#IDX235">sync</A> <LI><A HREF="FILEUTIL.000#IDX236">synchronize disk and memory</A> </DIR> <H2>t</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX26">text image, saving in swap space</A> <LI><A HREF="FILEUTIL.000#IDX197">timestamps, changing file</A> <LI><A HREF="FILEUTIL.000#IDX194">touch</A> <LI><A HREF="FILEUTIL.000#IDX105">truncating output file, avoiding</A> </DIR> <H2>u</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX44">umask and modes</A> <LI><A HREF="FILEUTIL.000#IDX165">unbuffered character special file</A> <LI><A HREF="FILEUTIL.000#IDX129">unlink</A> </DIR> <H2>v</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX72">vdir</A> <LI><A HREF="FILEUTIL.000#IDX7">version number, finding</A> <LI><A HREF="FILEUTIL.000#IDX14">version-control Emacs variable</A> <LI><A HREF="FILEUTIL.000#IDX12">VERSION_CONTROL</A> </DIR> <H2>w</H2> <DIR> <LI><A HREF="FILEUTIL.000#IDX18">write permission</A> <LI><A HREF="FILEUTIL.000#IDX37">write permission, symbolic</A> </DIR> <P> </BODY> </HTML>