home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / fileutils-3.13-bin.lha / info / fileutils.info-1 next >
Encoding:
GNU Info File  |  1996-10-12  |  48.4 KB  |  1,434 lines

  1. This is Info file fileutils.info, produced by Makeinfo-1.64 from the
  2. input file /ade-src/fsf/fileutils/doc/fileutils.texi.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * File utilities: (fileutils).  GNU file utilities.
  6. * chgrp: (fileutils)chgrp invocation.           Change file groups.
  7. * chown: (fileutils)chown invocation.           Change file owners/groups.
  8. * chmod: (fileutils)chmod invocation.           Change file permissions.
  9. * cp: (fileutils)cp invocation.                 Copy files.
  10. * dd: (fileutils)dd invocation.                 Copy and convert a file.
  11. * df: (fileutils)df invocation.                 Report filesystem disk usage.
  12. * dir: (fileutils)dir invocation.               List directories briefly.
  13. * dircolors: (fileutils)dircolors invocation.   Color setup for ls.
  14. * du: (fileutils)du invocation.                 Report on disk usage.
  15. * install: (fileutils)install invocation.       Copy and change attributes.
  16. * ln: (fileutils)ln invocation.                 Make links between files.
  17. * ls: (fileutils)ls invocation.                 List directory contents.
  18. * mkdir: (fileutils)mkdir invocation.           Create directories.
  19. * mkfifo: (fileutils)mkfifo invocation.         Create FIFOs: (named pipes).
  20. * mknod: (fileutils)mknod invocation.           Create special files.
  21. * mv: (fileutils)mv invocation.                 Rename files.
  22. * rm: (fileutils)rm invocation.                 Remove files.
  23. * rmdir: (fileutils)rmdir invocation.           Remove empty directories.
  24. * sync: (fileutils)sync invocation.             Synchronize memory and disk.
  25. * touch: (fileutils)touch invocation.           Change file timestamps.
  26. * vdir: (fileutils)vdir invocation.             List directories verbosely.
  27. END-INFO-DIR-ENTRY
  28.  
  29.    This file documents the GNU set of file utilities.
  30.  
  31.    Copyright (C) 1994, 95, 96 Free Software Foundation, Inc.
  32.  
  33.    Permission is granted to make and distribute verbatim copies of this
  34. manual provided the copyright notice and this permission notice are
  35. preserved on all copies.
  36.  
  37.    Permission is granted to copy and distribute modified versions of
  38. this manual under the conditions for verbatim copying, provided that
  39. the entire resulting derived work is distributed under the terms of a
  40. permission notice identical to this one.
  41.  
  42.    Permission is granted to copy and distribute translations of this
  43. manual into another language, under the above conditions for modified
  44. versions, except that this permission notice may be stated in a
  45. translation approved by the Foundation.
  46.  
  47. 
  48. File: fileutils.info,  Node: Top,  Next: Introduction,  Up: (dir)
  49.  
  50. GNU file utilities
  51. ******************
  52.  
  53.    This manual minimally documents version 3.13 of the GNU file
  54. utilities.
  55.  
  56. * Menu:
  57.  
  58. * Introduction::                Caveats, overview, and authors.
  59. * Common options::              Common options.
  60. * File permissions::            Access modes.
  61. * Date input formats::          Specifying date strings.
  62. * Directory listing::           ls dir vdir d v dircolors
  63. * Basic operations::            cp dd install mv rm
  64. * Special file types::          ln mkdir rmdir mkfifo mknod
  65. * Changing file attributes::    chgrp chmod chown touch
  66. * Disk usage::                  df du sync
  67. * Index::                       General index.
  68.  
  69. 
  70. File: fileutils.info,  Node: Introduction,  Next: Common options,  Prev: Top,  Up: Top
  71.  
  72. Introduction
  73. ************
  74.  
  75.    This manual is incomplete: No attempt is made to explain basic file
  76. concepts in a way suitable for novices.  Thus, if you are interested,
  77. please get involved in improving this manual.  The entire GNU community
  78. will benefit.
  79.  
  80.    The GNU file utilities are mostly compatible with the POSIX.2
  81. standard.
  82.  
  83.    Please report bugs to `bug-gnu-utils@prep.ai.mit.edu'.  Remember to
  84. include the version number, machine architecture, input files, and any
  85. other information needed to reproduce the bug: your input, what you
  86. expected, what you got, and why it is wrong.  Diffs are welcome, but
  87. please include a description of the problem as well, since this is
  88. sometimes difficult to infer. *Note Bugs: (gcc)Bugs.
  89.  
  90.    This manual is based on the Unix man pages in the distribution, which
  91. were originally written by David MacKenzie and updated by Jim Meyering.
  92. Franc,ois Pinard did the initial conversion to Texinfo format.  Karl
  93. Berry did the indexing, some reorganization, and editing of the results.
  94. Richard Stallman contributed his usual invaluable insights to the
  95. overall process.
  96.  
  97. 
  98. File: fileutils.info,  Node: Common options,  Next: File permissions,  Prev: Introduction,  Up: Top
  99.  
  100. Common options
  101. **************
  102.  
  103.    Certain options are available in all of these programs (in fact,
  104. every GNU program should accept them).  Rather than writing identical
  105. descriptions for each of the programs, they are described here.
  106.  
  107. `--help'
  108.      Print a usage message listing all available options, then exit
  109.      successfully.
  110.  
  111. `--version'
  112.      Print the version number, then exit successfully.
  113.  
  114. * Menu:
  115.  
  116. * Backup options::              -b -S -V, in some programs.
  117.  
  118. 
  119. File: fileutils.info,  Node: Backup options,  Up: Common options
  120.  
  121. Backup options
  122. ==============
  123.  
  124.    Some GNU programs (at least `cp', `install', `ln', and `mv')
  125. optionally make backups of files before writing new versions.  These
  126. options control the details of these backups.  The options are also
  127. briefly mentioned in the descriptions of the particular programs.
  128.  
  129. `-b'
  130. `--backup'
  131.      Make backups of files that are about to be overwritten or removed.
  132.      Without this option, the original versions are destroyed.
  133.  
  134. `-S SUFFIX'
  135. `--suffix=SUFFIX'
  136.      Append SUFFIX to each backup file made with `-b'.  If this option
  137.      is not specified, the value of the `SIMPLE_BACKUP_SUFFIX'
  138.      environment variable is used.  And if `SIMPLE_BACKUP_SUFFIX' is not
  139.      set, the default is `~', just as in Emacs.
  140.  
  141. `-V METHOD'
  142. `--version-control=METHOD'
  143.      Use METHOD to determine the type of backups made with `-b'.  If
  144.      this option is not specified, the value of the `VERSION_CONTROL'
  145.      environment variable is used.  And if `VERSION_CONTROL' is not set,
  146.      the default backup type is `existing'.
  147.  
  148.      This option corresponds to the Emacs variable `version-control';
  149.      the same values for METHOD are accepted as in Emacs.  This options
  150.      also more descriptive name.  The valid METHODs (unique
  151.      abbreviations are accepted):
  152.  
  153.     `t'
  154.     `numbered'
  155.           Always make numbered backups.
  156.  
  157.     `nil'
  158.     `existing'
  159.           Make numbered backups of files that already have them, simple
  160.           backups of the others.
  161.  
  162.     `never'
  163.     `simple'
  164.           Always make simple backups.
  165.  
  166. 
  167. File: fileutils.info,  Node: File permissions,  Next: Date input formats,  Prev: Common options,  Up: Top
  168.  
  169. File permissions
  170. ****************
  171.  
  172.    Each file has a set of "permissions" that control the kinds of
  173. access that users have to that file.  The permissions for a file are
  174. also called its "access mode".  They can be represented either in
  175. symbolic form or as an octal number.
  176.  
  177. * Menu:
  178.  
  179. * Mode Structure::              Structure of file permissions.
  180. * Symbolic Modes::              Mnemonic permissions representation.
  181. * Numeric Modes::               Permissions as octal numbers.
  182.  
  183. 
  184. File: fileutils.info,  Node: Mode Structure,  Next: Symbolic Modes,  Up: File permissions
  185.  
  186. Structure of File Permissions
  187. =============================
  188.  
  189.    There are three kinds of permissions that a user can have for a file:
  190.  
  191.   1. permission to read the file.  For directories, this means
  192.      permission to list the contents of the directory.
  193.  
  194.   2. permission to write to (change) the file.  For directories, this
  195.      means permission to create and remove files in the directory.
  196.  
  197.   3. permission to execute the file (run it as a program).  For
  198.      directories, this means permission to access files in the
  199.      directory.
  200.  
  201.    There are three categories of users who may have different
  202. permissions to perform any of the above operations on a file:
  203.  
  204.   1. the file's owner;
  205.  
  206.   2. other users who are in the file's group;
  207.  
  208.   3. everyone else.
  209.  
  210.    Files are given an owner and group when they are created.  Usually
  211. the owner is the current user and the group is the group of the
  212. directory the file is in, but this varies with the operating system, the
  213. filesystem the file is created on, and the way the file is created.  You
  214. can change the owner and group of a file by using the `chown' and
  215. `chgrp' commands.
  216.  
  217.    In addition to the three sets of three permissions listed above, a
  218. file's permissions have three special components, which affect only
  219. executable files (programs) and, on some systems, directories:
  220.  
  221.   1. set the process's effective user ID to that of the file upon
  222.      execution (called the "setuid bit").  No effect on directories.
  223.  
  224.   2. set the process's effective group ID to that of the file upon
  225.      execution (called the "setgid bit").  For directories on some
  226.      systems, put files created in the directory into the same group as
  227.      the directory, no matter what group the user who creates them is
  228.      in.
  229.  
  230.   3. save the program's text image on the swap device so it will load
  231.      more quickly when run (called the "sticky bit").  For directories
  232.      on some systems, prevent users from removing files that they do
  233.      not own in the directory; this is called making the directory
  234.      "append-only".
  235.  
  236. 
  237. File: fileutils.info,  Node: Symbolic Modes,  Next: Numeric Modes,  Prev: Mode Structure,  Up: File permissions
  238.  
  239. Symbolic Modes
  240. ==============
  241.  
  242.    "Symbolic modes" represent changes to files' permissions as
  243. operations on single-character symbols.  They allow you to modify either
  244. all or selected parts of files' permissions, optionally based on their
  245. previous values, and perhaps on the current `umask' as well (*note
  246. Umask and Protection::.).
  247.  
  248.    The format of symbolic modes is:
  249.  
  250.      [ugoa...][[+-=][rwxXstugo...]...][,...]
  251.  
  252.    The following sections describe the operators and other details of
  253. symbolic modes.
  254.  
  255. * Menu:
  256.  
  257. * Setting Permissions::          Basic operations on permissions.
  258. * Copying Permissions::          Copying existing permissions.
  259. * Changing Special Permissions:: Special permissions.
  260. * Conditional Executability::    Conditionally affecting executability.
  261. * Multiple Changes::             Making multiple changes.
  262. * Umask and Protection::              The effect of the umask.
  263.  
  264. 
  265. File: fileutils.info,  Node: Setting Permissions,  Next: Copying Permissions,  Up: Symbolic Modes
  266.  
  267. Setting Permissions
  268. -------------------
  269.  
  270.    The basic symbolic operations on a file's permissions are adding,
  271. removing, and setting the permission that certain users have to read,
  272. write, and execute the file.  These operations have the following
  273. format:
  274.  
  275.      USERS OPERATION PERMISSIONS
  276.  
  277. The spaces between the three parts above are shown for readability only;
  278. symbolic modes can not contain spaces.
  279.  
  280.    The USERS part tells which users' access to the file is changed.  It
  281. consists of one or more of the following letters (or it can be empty;
  282. *note Umask and Protection::., for a description of what happens then).
  283. When more than one of these letters is given, the order that they are
  284. in does not matter.
  285.  
  286. `u'
  287.      the user who owns the file;
  288.  
  289. `g'
  290.      other users who are in the file's group;
  291.  
  292. `o'
  293.      all other users;
  294.  
  295. `a'
  296.      all users; the same as `ugo'.
  297.  
  298.    The OPERATION part tells how to change the affected users' access to
  299. the file, and is one of the following symbols:
  300.  
  301. `+'
  302.      to add the PERMISSIONS to whatever permissions the USERS already
  303.      have for the file;
  304.  
  305. `-'
  306.      to remove the PERMISSIONS from whatever permissions the USERS
  307.      already have for the file;
  308.  
  309. `='
  310.      to make the PERMISSIONS the only permissions that the USERS have
  311.      for the file.
  312.  
  313.    The PERMISSIONS part tells what kind of access to the file should be
  314. changed; it is zero or more of the following letters.  As with the
  315. USERS part, the order does not matter when more than one letter is
  316. given.  Omitting the PERMISSIONS part is useful only with the `='
  317. operation, where it gives the specified USERS no access at all to the
  318. file.
  319.  
  320. `r'
  321.      the permission the USERS have to read the file;
  322.  
  323. `w'
  324.      the permission the USERS have to write to the file;
  325.  
  326. `x'
  327.      the permission the USERS have to execute the file.
  328.  
  329.    For example, to give everyone permission to read and write a file,
  330. but not to execute it, use:
  331.  
  332.      a=rw
  333.  
  334.    To remove write permission for from all users other than the file's
  335. owner, use:
  336.  
  337.      go-w
  338.  
  339. The above command does not affect the access that the owner of the file
  340. has to it, nor does it affect whether other users can read or execute
  341. the file.
  342.  
  343.    To give everyone except a file's owner no permission to do anything
  344. with that file, use the mode below.  Other users could still remove the
  345. file, if they have write permission on the directory it is in.
  346.  
  347.      go=
  348.  
  349. Another way to specify the same thing is:
  350.  
  351.      og-rxw
  352.  
  353. 
  354. File: fileutils.info,  Node: Copying Permissions,  Next: Changing Special Permissions,  Prev: Setting Permissions,  Up: Symbolic Modes
  355.  
  356. Copying Existing Permissions
  357. ----------------------------
  358.  
  359.    You can base a file's permissions on its existing permissions.  To do
  360. this, instead of using `r', `w', or `x' after the operator, you use the
  361. letter `u', `g', or `o'.  For example, the mode
  362.      o+g
  363.  
  364. adds the permissions for users who are in a file's group to the
  365. permissions that other users have for the file.  Thus, if the file
  366. started out as mode 664 (`rw-rw-r--'), the above mode would change it
  367. to mode 666 (`rw-rw-rw-').  If the file had started out as mode 741
  368. (`rwxr----x'), the above mode would change it to mode 745
  369. (`rwxr--r-x').  The `-' and `=' operations work analogously.
  370.  
  371. 
  372. File: fileutils.info,  Node: Changing Special Permissions,  Next: Conditional Executability,  Prev: Copying Permissions,  Up: Symbolic Modes
  373.  
  374. Changing Special Permissions
  375. ----------------------------
  376.  
  377.    In addition to changing a file's read, write, and execute
  378. permissions, you can change its special permissions.  *Note Mode
  379. Structure::, for a summary of these permissions.
  380.  
  381.    To change a file's permission to set the user ID on execution, use
  382. `u' in the USERS part of the symbolic mode and `s' in the PERMISSIONS
  383. part.
  384.  
  385.    To change a file's permission to set the group ID on execution, use
  386. `g' in the USERS part of the symbolic mode and `s' in the PERMISSIONS
  387. part.
  388.  
  389.    To change a file's permission to stay permanently on the swap device,
  390. use `o' in the USERS part of the symbolic mode and `t' in the
  391. PERMISSIONS part.
  392.  
  393.    For example, to add set user ID permission to a program, you can use
  394. the mode:
  395.  
  396.      u+s
  397.  
  398.    To remove both set user ID and set group ID permission from it, you
  399. can use the mode:
  400.  
  401.      ug-s
  402.  
  403.    To cause a program to be saved on the swap device, you can use the
  404. mode:
  405.  
  406.      o+t
  407.  
  408.    Remember that the special permissions only affect files that are
  409. executable, plus, on some systems, directories (on which they have
  410. different meanings; *note Mode Structure::.).  Using `a' in the USERS
  411. part of a symbolic mode does not cause the special permissions to be
  412. affected; thus,
  413.  
  414.      a+s
  415.  
  416. has *no effect*.  You must use `u', `g', and `o' explicitly to affect
  417. the special permissions.  Also, the combinations `u+t', `g+t', and
  418. `o+s' have no effect.
  419.  
  420.    The `=' operator is not very useful with special permissions; for
  421. example, the mode:
  422.  
  423.      o=t
  424.  
  425. does cause the file to be saved on the swap device, but it also removes
  426. all read, write, and execute permissions that users not in the file's
  427. group might have had for it.
  428.  
  429. 
  430. File: fileutils.info,  Node: Conditional Executability,  Next: Multiple Changes,  Prev: Changing Special Permissions,  Up: Symbolic Modes
  431.  
  432. Conditional Executability
  433. -------------------------
  434.  
  435.    There is one more special type of symbolic permission: if you use
  436. `X' instead of `x', execute permission is affected only if the file
  437. already had execute permission or is a directory.  It affects
  438. directories' execute permission even if they did not initially have any
  439. execute permissions set.
  440.  
  441.    For example, this mode:
  442.  
  443.      a+X
  444.  
  445. gives all users permission to execute files (or search directories) if
  446. anyone could before.
  447.  
  448. 
  449. File: fileutils.info,  Node: Multiple Changes,  Next: Umask and Protection,  Prev: Conditional Executability,  Up: Symbolic Modes
  450.  
  451. Making Multiple Changes
  452. -----------------------
  453.  
  454.    The format of symbolic modes is actually more complex than described
  455. above (*note Setting Permissions::.).  It provides two ways to make
  456. multiple changes to files' permissions.
  457.  
  458.    The first way is to specify multiple OPERATION and PERMISSIONS parts
  459. after a USERS part in the symbolic mode.
  460.  
  461.    For example, the mode:
  462.  
  463.      og+rX-w
  464.  
  465. gives users other than the owner of the file read permission and, if it
  466. is a directory or if someone already had execute permission to it,
  467. gives them execute permission; and it also denies them write permission
  468. to it file.  It does not affect the permission that the owner of the
  469. file has for it.  The above mode is equivalent to the two modes:
  470.  
  471.      og+rX
  472.      og-w
  473.  
  474.    The second way to make multiple changes is to specify more than one
  475. simple symbolic mode, separated by commas.  For example, the mode:
  476.  
  477.      a+r,go-w
  478.  
  479. gives everyone permission to read the file and removes write permission
  480. on it for all users except its owner.  Another example:
  481.  
  482.      u=rwx,g=rx,o=
  483.  
  484. sets all of the non-special permissions for the file explicitly.  (It
  485. gives users who are not in the file's group no permission at all for
  486. it.)
  487.  
  488.    The two methods can be combined.  The mode:
  489.  
  490.      a+r,g+x-w
  491.  
  492. gives all users permission to read the file, and gives users who are in
  493. the file's group permission to execute it, as well, but not permission
  494. to write to it.  The above mode could be written in several different
  495. ways; another is:
  496.  
  497.      u+r,g+rx,o+r,g-w
  498.  
  499. 
  500. File: fileutils.info,  Node: Umask and Protection,  Prev: Multiple Changes,  Up: Symbolic Modes
  501.  
  502. The Umask and Protection
  503. ------------------------
  504.  
  505.    If the USERS part of a symbolic mode is omitted, it defaults to `a'
  506. (affect all users), except that any permissions that are *set* in the
  507. system variable `umask' are *not affected*.  The value of `umask' can
  508. be set using the `umask' command.  Its default value varies from system
  509. to system.
  510.  
  511.    Omitting the USERS part of a symbolic mode is generally not useful
  512. with operations other than `+'.  It is useful with `+' because it
  513. allows you to use `umask' as an easily customizable protection against
  514. giving away more permission to files than you intended to.
  515.  
  516.    As an example, if `umask' has the value 2, which removes write
  517. permission for users who are not in the file's group, then the mode:
  518.  
  519.      +w
  520.  
  521. adds permission to write to the file to its owner and to other users who
  522. are in the file's group, but *not* to other users.  In contrast, the
  523. mode:
  524.  
  525.      a+w
  526.  
  527. ignores `umask', and *does* give write permission for the file to all
  528. users.
  529.  
  530. 
  531. File: fileutils.info,  Node: Numeric Modes,  Prev: Symbolic Modes,  Up: File permissions
  532.  
  533. Numeric Modes
  534. =============
  535.  
  536.    File permissions are stored internally as 16 bit integers.  As an
  537. alternative to giving a symbolic mode, you can give an octal (base 8)
  538. number that corresponds to the internal representation of the new mode.
  539. This number is always interpreted in octal; you do not have to add a
  540. leading 0, as you do in C.  Mode 0055 is the same as mode 55.
  541.  
  542.    A numeric mode is usually shorter than the corresponding symbolic
  543. mode, but it is limited in that it can not take into account a file's
  544. previous permissions; it can only set them absolutely.
  545.  
  546.    The permissions granted to the user, to other users in the file's
  547. group, and to other users not in the file's group are each stored as
  548. three bits, which are represented as one octal digit.  The three special
  549. permissions are also each stored as one bit, and they are as a group
  550. represented as another octal digit.  Here is how the bits are arranged
  551. in the 16 bit integer, starting with the lowest valued bit:
  552.  
  553.      Value in  Corresponding
  554.      Mode      Permission
  555.      
  556.                Other users not in the file's group:
  557.         1      Execute
  558.         2      Write
  559.         4      Read
  560.      
  561.                Other users in the file's group:
  562.        10      Execute
  563.        20      Write
  564.        40      Read
  565.      
  566.                The file's owner:
  567.       100      Execute
  568.       200      Write
  569.       400      Read
  570.      
  571.                Special permissions:
  572.      1000      Save text image on swap device
  573.      2000      Set group ID on execution
  574.      4000      Set user ID on execution
  575.  
  576.    For example, numeric mode 4755 corresponds to symbolic mode
  577. `u=rwxs,go=rx', and numeric mode 664 corresponds to symbolic mode
  578. `ug=rw,o=r'.  Numeric mode 0 corresponds to symbolic mode `ugo='.
  579.  
  580. 
  581. File: fileutils.info,  Node: Date input formats,  Next: Directory listing,  Prev: File permissions,  Up: Top
  582.  
  583. Date input formats
  584. ******************
  585.  
  586.    This section describes the textual date representations that GNU
  587. programs accept.  These are the strings you, as a user, can supply as
  588. arguments to the various programs.  The C interface (via the `getdate'
  589. function) is not described here.
  590.  
  591.    Although the date syntax here can represent any possible time since
  592. zero A.D., computer integers are not big enough for such a
  593. (comparatively) long time.  The earliest date semantically allowed on
  594. Unix systems is midnight, 1 January 1970 UCT.
  595.  
  596. * Menu:
  597.  
  598. * General date syntax::            Common rules.
  599. * Calendar date item::             19 Dec 1994.
  600. * Time of day item::               9:20pm.
  601. * Timezone item::                  EST, DST, BST, UCT, AHST, ...
  602. * Day of week item::               Monday and others.
  603. * Relative item in date strings::  next tuesday, 2 years ago.
  604. * Pure numbers in date strings::   19931219, 1440.
  605. * Authors of getdate::             Bellovin, Salz, Berets, et al.
  606.  
  607. 
  608. File: fileutils.info,  Node: General date syntax,  Next: Calendar date item,  Up: Date input formats
  609.  
  610. General date syntax
  611. ===================
  612.  
  613.    A "date" is a string, possibly empty, containing many items
  614. separated by whitespace.  The whitespace may be omitted when no
  615. ambiguity arises.  The empty string means the beginning of today (i.e.,
  616. midnight).  Order of the items is immaterial.  A date string may contain
  617. many flavors of items:
  618.  
  619.    * calendar date items
  620.  
  621.    * time of the day items
  622.  
  623.    * time zone items
  624.  
  625.    * day of the week items
  626.  
  627.    * relative items
  628.  
  629.    * pure numbers.
  630.  
  631. We describe each of these item types in turn, below.
  632.  
  633.    A few numbers may be written out in words in most contexts.  This is
  634. most useful for specifying day of the week items or relative items (see
  635. below).  Here is the list: `first' for 1, `next' for 2, `third' for 3,
  636. `fourth' for 4, `fifth' for 5, `sixth' for 6, `seventh' for 7, `eighth'
  637. for 8, `ninth' for 9, `tenth' for 10, `eleventh' for 11 and `twelfth'
  638. for 12.  Also, `last' means exactly -1.
  639.  
  640.    When a month is written this way, it is still considered to be
  641. written numerically, instead of being "spelled in full"; this changes
  642. the allowed strings.
  643.  
  644.    Alphabetic case is completely ignored in dates.  Comments may be
  645. introduced between round parentheses, as long as included parentheses
  646. are properly nested.  Hyphens not followed by a digit are currently
  647. ignored.  Leading zeros on numbers are ignored.
  648.  
  649. 
  650. File: fileutils.info,  Node: Calendar date item,  Next: Time of day item,  Prev: General date syntax,  Up: Date input formats
  651.  
  652. Calendar date item
  653. ==================
  654.  
  655.    A "calendar date item" specifies a day of the year.  It is specified
  656. differently, depending on whether the month is specified numerically or
  657. literally.  All these strings specify the same calendar date:
  658.  
  659.      1970-09-17           # ISO 8601.
  660.      70-9-17              # This century assumed by default.
  661.      70-09-17             # Leading zeros are ignored.
  662.      9/17/72              # Common U.S. writing.
  663.      24 September 1972
  664.      24 Sept 72           # September has a special abbreviation.
  665.      24 Sep 72            # Three-letter abbreviations always allowed.
  666.      Sep 24, 1972
  667.      24-sep-72
  668.      24sep72
  669.  
  670.    The year can also be omitted.  In this case, the last specified year
  671. is used, or the current year if none.  For example:
  672.  
  673.      9/17
  674.      sep 17
  675.  
  676.    Here are the rules.
  677.  
  678.    For numeric months, the ISO 8601 format `YEAR-MONTH-DAY' is allowed,
  679. where YEAR is any positive number, MONTH is a number between 01 and 12,
  680. and DAY is a number between 01 and 31.  A leading zero must be present
  681. if a number is less than ten.  If YEAR is less than 100, then 1900 is
  682. added to it to force a date in this century.  The construct
  683. `MONTH/DAY/YEAR', popular in the United States, is accepted.  Also
  684. `MONTH/DAY', omitting the year.
  685.  
  686.    Literal months may be spelled out in full: `January', `February',
  687. `March', `April', `May', `June', `July', `August', `September',
  688. `October', `November' or `December'.  Literal months may be abbreviated
  689. to their first three letters, possibly followed by an abbreviating dot.
  690. It is also permitted to write `Sept' instead of `September'.
  691.  
  692.    When months are written literally, the calendar date may be given as
  693. any of the following:
  694.  
  695.      DAY MONTH YEAR
  696.      DAY MONTH
  697.      MONTH DAY YEAR
  698.      DAY-MONTH-YEAR
  699.  
  700.    Or, omitting the year:
  701.  
  702.      MONTH DAY
  703.  
  704. 
  705. File: fileutils.info,  Node: Time of day item,  Next: Timezone item,  Prev: Calendar date item,  Up: Date input formats
  706.  
  707. Time of day item
  708. ================
  709.  
  710.    A "time of day item" in date strings specifies the time on a given
  711. day.  Here are some examples, all of which represent the same time:
  712.  
  713.      20:02:0
  714.      20:02
  715.      8:02pm
  716.      20:02-0500      # In EST (Eastern U.S. Standard Time).
  717.  
  718.    More generally, the time of the day may be given as
  719. `HOUR:MINUTE:SECOND', where HOUR is a number between 0 and 23, MINUTE
  720. is a number between 0 and 59, and SECOND is a number between 0 and 59.
  721. Alternatively, `:SECOND' can be omitted, in which case it is taken to
  722. be zero.
  723.  
  724.    If the time is followed by `am' or `pm' (or `a.m.' or `p.m.'), HOUR
  725. is restricted to run from 1 to 12, and `:MINUTE' may be omitted (taken
  726. to be zero).  `am' indicates the first half of the day, `pm' indicates
  727. the second half of the day.  In this notation, 12 is the predecessor of
  728. 1: midnight is `12am' while noon is `12pm'.
  729.  
  730.    The time may alternatively be followed by a timezone correction,
  731. expressed as `SHHMM', where S is `+' or `-', HH is a number of zone
  732. hours and MM is a number of zone minutes.  When a timezone correction
  733. is given this way, it forces interpretation of the time in UTC,
  734. overriding any previous specification for the timezone or the local
  735. timezone.  The MINUTE part of the time of the day may not be elided
  736. when a timezone correction is used.  This is the only way to specify a
  737. timezone correction by fractional parts of an hour.
  738.  
  739.    Either `am'/`pm' or a timezone correction may be specified, but not
  740. both.
  741.  
  742. 
  743. File: fileutils.info,  Node: Timezone item,  Next: Day of week item,  Prev: Time of day item,  Up: Date input formats
  744.  
  745. Timezone item
  746. =============
  747.  
  748.    A "timezone item" specifies an international timezone, indicated by
  749. a small set of letters.  Any included period is ignored.  Military
  750. timezone designations use a single letter.  Currently, only integral
  751. zone hours may be represented in a timezone item.  See the previous
  752. section for a finer control over the timezone correction.
  753.  
  754.    Here are many non-daylight-savings-time timezones, indexed by the
  755. zone hour value.
  756.  
  757. +000
  758.      `GMT' for Greenwich Mean, `UT' or `UTC' for Universal
  759.      (Coordinated), `WET' for Western European and `Z' for militaries.
  760.  
  761. +100
  762.      `WAT' for West Africa and `A' for militaries.
  763.  
  764. +200
  765.      `AT' for Azores and `B' for militaries.
  766.  
  767. +300
  768.      `C' for militaries.
  769.  
  770. +400
  771.      `AST' for Atlantic Standard and `D' for militaries.
  772.  
  773. +500
  774.      `E' for militaries and `EST' for Eastern Standard.
  775.  
  776. +600
  777.      `CST' for Central Standard and `F' for militaries.
  778.  
  779. +700
  780.      `G' for militaries and `MST' for Mountain Standard.
  781.  
  782. +800
  783.      `H' for militaries and `PST' for Pacific Standard.
  784.  
  785. +900
  786.      `I' for militaries and `YST' for Yukon Standard.
  787.  
  788. +1000
  789.      `AHST' for Alaska-Hawaii Standard, `CAT' for Central Alaska, `HST'
  790.      for Hawaii Standard and `K' for militaries.
  791.  
  792. +1100
  793.      `L' for militaries and `NT' for Nome.
  794.  
  795. +1200
  796.      `IDLW' for International Date Line West and `M' for militaries.
  797.  
  798. -100
  799.      `CET' for Central European, `FWT' for French Winter, `MET' for
  800.      Middle European, `MEWT' for Middle European Winter, `N' for
  801.      militaries and `SWT' for Swedish Winter.
  802.  
  803. -200
  804.      `EET' for Eastern European, USSR Zone 1 and `O' for militaries.
  805.  
  806. -300
  807.      `BT' for Baghdad, USSR Zone 2 and `P' for militaries.
  808.  
  809. -400
  810.      `Q' for militaries and `ZP4' for USSR Zone 3.
  811.  
  812. -500
  813.      `R' for militaries and `ZP5' for USSR Zone 4.
  814.  
  815. -600
  816.      `S' for militaries and `ZP6' for USSR Zone 5.
  817.  
  818. -700
  819.      `T' for militaries and `WAST' for West Australian Standard.
  820.  
  821. -800
  822.      `CCT' for China Coast, USSR Zone 7 and `U' for militaries.
  823.  
  824. -900
  825.      `JST' for Japan Standard, USSR Zone 8 and `V' for militaries.
  826.  
  827. -1000
  828.      `EAST' for East Australian Standard, `GST' for Guam Standard, USSR
  829.      Zone 9 and `W' for militaries.
  830.  
  831. -1100
  832.      `X' for militaries.
  833.  
  834. -1200
  835.      `IDLE' for International Date Line East, `NZST' for New Zealand
  836.      Standard, `NZT' for New Zealand and `Y' for militaries.
  837.  
  838.    Here are many DST timezones, indexed by the zone hour value.  Also,
  839. by following a non-DST timezone by the string `DST' in a separate word
  840. (that is, separated by some whitespace), the corresponding DST timezone
  841. may be specified.
  842.  
  843. 0
  844.      `BST' for British Summer.
  845.  
  846. +400
  847.      `ADT' for Atlantic Daylight.
  848.  
  849. +500
  850.      `EDT' for Eastern Daylight.
  851.  
  852. +600
  853.      `CDT' for Central Daylight.
  854.  
  855. +700
  856.      `MDT' for Mountain Daylight.
  857.  
  858. +800
  859.      `PDT' for Pacific Daylight.
  860.  
  861. +900
  862.      `YDT' for Yukon Daylight.
  863.  
  864. +1000
  865.      `HDT' for Hawaii Daylight.
  866.  
  867. -100
  868.      `MEST' for Middle European Summer, `MESZ' for Middle European
  869.      Summer, `SST' for Swedish Summer and `FST' for French Summer.
  870.  
  871. -700
  872.      `WADT' for West Australian Daylight.
  873.  
  874. -1000
  875.      `EADT' for Eastern Australian Daylight.
  876.  
  877. -1200
  878.      `NZDT' for New Zealand Daylight.
  879.  
  880. 
  881. File: fileutils.info,  Node: Day of week item,  Next: Relative item in date strings,  Prev: Timezone item,  Up: Date input formats
  882.  
  883. Day of week item
  884. ================
  885.  
  886.    The explicit mention of a day of the week will forward the date
  887. (only if necessary) to reach that day of the week in the future.
  888.  
  889.    Days of the week may be spelled out in full: `Sunday', `Monday',
  890. `Tuesday', `Wednesday', `Thursday', `Friday' or `Saturday'.  Days may
  891. be abbreviated to their first three letters, optionally followed by a
  892. period.  The special abbreviations `Tues' for `Tuesday', `Wednes' for
  893. `Wednesday' and `Thur' or `Thurs' for `Thursday' are also allowed.
  894.  
  895.    A number may precede a day of the week item to move forward
  896. supplementary weeks.  It is best used in expression like `third
  897. monday'.  In this context, `last DAY' or `next DAY' is also acceptable;
  898. they move one week before or after the day that DAY by itself would
  899. represent.
  900.  
  901.    A comma following a day of the week item is ignored.
  902.  
  903. 
  904. File: fileutils.info,  Node: Relative item in date strings,  Next: Pure numbers in date strings,  Prev: Day of week item,  Up: Date input formats
  905.  
  906. Relative item in date strings
  907. =============================
  908.  
  909.    "Relative items" adjust a date (or the current date if none) forward
  910. or backward.  The effects of relative items accumulate.  Here are some
  911. examples:
  912.  
  913.      1 year
  914.      1 year ago
  915.      3 years
  916.      2 days
  917.  
  918.    The unit of time displacement may be selected by the string `year'
  919. or `month' for moving by whole years or months.  These are fuzzy units,
  920. as years and months are not all of equal duration.  More precise units
  921. are `fortnight' which is worth 14 days, `week' worth 7 days, `day'
  922. worth 24 hours, `hour' worth 60 minutes, `minute' or `min' worth 60
  923. seconds, and `second' or `sec' worth one second.  An `s' suffix on
  924. these units is accepted and ignored.
  925.  
  926.    The unit of time may be preceded by a multiplier, given as an
  927. optionally signed number.  Unsigned numbers are taken as positively
  928. signed.  No number at all implies 1 for a multiplier.  Following a
  929. relative item by the string `ago' is equivalent to preceding the unit
  930. by a multiplicator with value -1.
  931.  
  932.    The string `tomorrow' is worth one day in the future (equivalent to
  933. `day'), the string `yesterday' is worth one day in the past (equivalent
  934. to `day ago').
  935.  
  936.    The strings `now' or `today' are relative items corresponding to
  937. zero-valued time displacement, these strings come from the fact a
  938. zero-valued time displacement represents the current time when not
  939. otherwise change by previous items.  They may be used to stress other
  940. items, like in `12:00 today'.  The string `this' also has the meaning
  941. of a zero-valued time displacement, but is preferred in date strings
  942. like `this thursday'.
  943.  
  944.    When a relative item makes the resulting date to cross the boundary
  945. between DST and non-DST (or vice-versa), the hour is adjusted according
  946. to the local time.
  947.  
  948. 
  949. File: fileutils.info,  Node: Pure numbers in date strings,  Next: Authors of getdate,  Prev: Relative item in date strings,  Up: Date input formats
  950.  
  951. Pure numbers in date strings
  952. ============================
  953.  
  954.    The precise intepretation of a pure decimal number is dependent of
  955. the context in the date string.
  956.  
  957.    If the decimal number is of the form YYYYMMDD and no other calendar
  958. date item (*note Calendar date item::.) appears before it in the date
  959. string, then YYYY is read as the year, MM as the month number and DD as
  960. the day of the month, for the specified calendar date.
  961.  
  962.    If the decimal number is of the form HHMM and no other time of day
  963. item appears before it in the date string, then HH is read as the hour
  964. of the day and MM as the minute of the hour, for the specified time of
  965. the day.  MM can also be omitted.
  966.  
  967.    If both a calendar date and a time of day appear to the left of a
  968. number in the date string, but no relative item, then the number
  969. overrides the year.
  970.  
  971. 
  972. File: fileutils.info,  Node: Authors of getdate,  Prev: Pure numbers in date strings,  Up: Date input formats
  973.  
  974. Authors of `getdate'
  975. ====================
  976.  
  977.    `getdate' was originally implemented by Steven M. Bellovin
  978. (`smb@research.att.com') while at the University of North Carolina at
  979. Chapel Hill.  The code was later tweaked by a couple of people on
  980. Usenet, then completely overhauled by Rich $alz (`rsalz@bbn.com') and
  981. Jim Berets (`jberets@bbn.com') in August, 1990.  Various revisions for
  982. the GNU system were made by David MacKenzie, Jim Meyering, and others.
  983.  
  984.    This chapter was originally produced by Franc,ois Pinard
  985. (`pinard@iro.umontreal.ca') from the `getdate.y' source code, and then
  986. edited by K. Berry (`kb@cs.umb.edu').
  987.  
  988. 
  989. File: fileutils.info,  Node: Directory listing,  Next: Basic operations,  Prev: Date input formats,  Up: Top
  990.  
  991. Directory listing
  992. *****************
  993.  
  994.    This chapter describes the `ls' command and its variants `dir' and
  995. `vdir', which list information about files.
  996.  
  997. * Menu:
  998.  
  999. * ls invocation::               List directory contents.
  1000. * dir invocation::              Briefly ls.
  1001. * vdir invocation::             Verbosely ls.
  1002. * dircolors invocation::        Color setup for ls, etc.
  1003.  
  1004. 
  1005. File: fileutils.info,  Node: ls invocation,  Next: dir invocation,  Up: Directory listing
  1006.  
  1007. `ls': List directory contents
  1008. =============================
  1009.  
  1010.    The `ls' program lists information about files (of any type,
  1011. including directories).  Options and file arguments can be intermixed
  1012. arbitrarily, as usual.
  1013.  
  1014.    For non-option command-line arguments that are directories, by
  1015. default `ls' lists the contents of directories, not recursively, and
  1016. omitting files with names beginning with `.'.  For other non-option
  1017. arguments, by default `ls' lists just the file name.  If no non-option
  1018. arguments are specified, `ls' lists the contents of the current
  1019. directory.
  1020.  
  1021.    By default, the output is sorted alphabetically.  If standard output
  1022. is a terminal, the output is in columns (sorted vertically); otherwise,
  1023. they are listed one per line.
  1024.  
  1025.    Because `ls' is such a fundamental program, it has accumulated many
  1026. options over the years.  They are described in the subsections below;
  1027. within each section, options are listed alphabetically (ignoring case).
  1028. The division of options into the subsections is not absolute, since some
  1029. options affect more than one aspect of `ls''s operation.
  1030.  
  1031.    The `-g' option is accepted but ignored, for compatibility with
  1032. Unix.  Also see *Note Common options::.
  1033.  
  1034. * Menu:
  1035.  
  1036. * Which files are listed::
  1037. * What information is listed::
  1038. * Sorting the output::
  1039. * General output formatting::
  1040. * Formatting the file names::
  1041.  
  1042. 
  1043. File: fileutils.info,  Node: Which files are listed,  Next: What information is listed,  Up: ls invocation
  1044.  
  1045. Which files are listed
  1046. ----------------------
  1047.  
  1048.    These options determine which files `ls' lists information for.  By
  1049. default, any files and the contents of any directories on the command
  1050. line are shown.
  1051.  
  1052. `-a'
  1053. `--all'
  1054.      List all files in directories, including files that start with `.'.
  1055.  
  1056. `-A'
  1057. `--almost-all'
  1058.      List all files in directories except for `.' and `..'.
  1059.  
  1060. `-B'
  1061. `--ignore-backups'
  1062.      Do not list files that end with `~', unless they are given on the
  1063.      command line.
  1064.  
  1065. `-d'
  1066. `--directory'
  1067.      List just the names of directories, as with other types of files,
  1068.      rather than listing their contents.
  1069.  
  1070. `-I'
  1071. `--ignore'
  1072.      Do not list files whose names match the shell pattern (not regular
  1073.      expression) PATTERN unless they are given on the command line.  As
  1074.      in the shell, an initial `.' in a file name does not match a
  1075.      wildcard at the start of PATTERN.
  1076.  
  1077. `-L'
  1078. `--dereference'
  1079.      List the files linked to by symbolic links instead of listing the
  1080.      contents of the links.
  1081.  
  1082. `-R'
  1083. `--recursive'
  1084.      List the contents of all directories recursively.
  1085.  
  1086. 
  1087. File: fileutils.info,  Node: What information is listed,  Next: Sorting the output,  Prev: Which files are listed,  Up: ls invocation
  1088.  
  1089. What information is listed
  1090. --------------------------
  1091.  
  1092.    These options affect the information that `ls' displays.  By
  1093. default, only file names are shown.
  1094.  
  1095. `-D'
  1096. `--dired'
  1097.      With the long listing (`-l') format, print an additional line after
  1098.      the main output:
  1099.  
  1100.           //DIRED// BEG1 END1 BEG2 END2 ...
  1101.  
  1102.      The BEGN and ENDN are unsigned integers which record the byte
  1103.      position of the beginning and end of each file name in the output.
  1104.      This makes it easy for Emacs to find the names, even when they
  1105.      contain unusual characters such as space or newline, without fancy
  1106.      searching.
  1107.  
  1108.      If directories are being listed recursively (`-R'), output a
  1109.      similar line after each subdirectory:
  1110.           //SUBDIRED// BEG1 END1 ...
  1111.  
  1112. `-G'
  1113. `--no-group'
  1114.      Inhibit display of group information in a long format directory
  1115.      listing.  (This is the default in some non-GNU versions of `ls',
  1116.      so we provide this option for compatibility.)
  1117.  
  1118. `-i'
  1119. `--inode'
  1120.      Print the inode number (also called the file serial number and
  1121.      index number) of each file to the left of the file name.  (This
  1122.      number uniquely identifies each file within a particular
  1123.      filesystem.)
  1124.  
  1125. `-l'
  1126. `--format=long'
  1127. `--format=verbose'
  1128.      In addition to the name of each file, print the file type,
  1129.      permissions, number of hard links, owner name, group name, size in
  1130.      bytes, and timestamp (by default, the modification time).  For
  1131.      files with a time more than six months old or more than one hour
  1132.      into the future, the timestamp contains the year instead of the
  1133.      time of day.
  1134.  
  1135.      For each directory that is listed, preface the files with a line
  1136.      `total BLOCKS', where BLOCKS is the total disk space used by all
  1137.      files in that directory.  By default, 1024-byte blocks are used;
  1138.      if the environment variable `POSIXLY_CORRECT' is set, 512-byte
  1139.      blocks are used (unless the `-k' option is given).  The BLOCKS
  1140.      computed counts each hard link separately; this is arguably a
  1141.      deficiency.
  1142.  
  1143.      The permissions listed are similar to symbolic mode specifications
  1144.      (*note Symbolic Modes::.).  But `ls' combines multiple bits into
  1145.      the third character of each set of permissions as follows:
  1146.     `s'
  1147.           If the setuid or setgid bit and the corresponding executable
  1148.           bit are both set.
  1149.  
  1150.     `S'
  1151.           If the setuid or setgid bit is set but the corresponding
  1152.           executable bit is not set.
  1153.  
  1154.     `t'
  1155.           If the sticky bit and the other-executable bit are both set.
  1156.  
  1157.     `T'
  1158.           If the sticky bit is set but the other-executable bit is not
  1159.           set.
  1160.  
  1161.     `x'
  1162.           If the executable bit is set and none of the above apply.
  1163.  
  1164.     `-'
  1165.           Otherwise.
  1166.  
  1167. `-o'
  1168.      Produce long format directory listings, but don't display group
  1169.      information.  It is equivalent to using `--format=long' with
  1170.      `--no-group' .  This option is provided for compatibility with
  1171.      other versions of `ls'.
  1172.  
  1173. `-s'
  1174. `--size'
  1175.      Print the size of each file in 1024-byte blocks to the left of the
  1176.      file name.  If the environment variable `POSIXLY_CORRECT' is set,
  1177.      512-byte blocks are used instead, unless the `-k' option is given
  1178.      (*note General output formatting::.).
  1179.  
  1180.      For files that are NFS-mounted from an HP-UX system to a BSD
  1181.      system, this option reports sizes that are half the correct
  1182.      values.  On HP-UX systems, it reports sizes that are twice the
  1183.      correct values for files that are NFS-mounted from BSD systems.
  1184.      This is due to a flaw in HP-UX; it also affects the HP-UX `ls'
  1185.      program.
  1186.  
  1187. 
  1188. File: fileutils.info,  Node: Sorting the output,  Next: General output formatting,  Prev: What information is listed,  Up: ls invocation
  1189.  
  1190. Sorting the output
  1191. ------------------
  1192.  
  1193.    These options change the order in which `ls' sorts the information
  1194. it outputs.  By default, sorting is done by character code (e.g., ASCII
  1195. order).
  1196.  
  1197. `-c'
  1198. `--time=ctime'
  1199. `--time=status'
  1200.      Sort according to the status change time (the `ctime' in the
  1201.      inode).  If the long listing format (`-l') is being used, print the
  1202.      status change time instead of the modification time.
  1203.  
  1204. `-f'
  1205.      Primarily, like `-U'--do not sort; list the files in whatever
  1206.      order they are stored in the directory.  But also enable `-a' (list
  1207.      all files) and disable `-l', `--color', and `-s' (if they were
  1208.      specified before the `-f').
  1209.  
  1210. `-r'
  1211. `--reverse'
  1212.      Reverse whatever the sorting method is--e.g., list files in reverse
  1213.      alphabetical order, youngest first, smallest first, or whatever.
  1214.  
  1215. `-S'
  1216. `--sort=size'
  1217.      Sort by file size, largest first.
  1218.  
  1219. `-t'
  1220. `--sort=time'
  1221.      Sort by modification time (the `mtime' in the inode), newest first.
  1222.  
  1223. `-u'
  1224. `--time=atime'
  1225. `--time=access'
  1226. `--time=use'
  1227.      Sort by access time (the `atime' in the inode).  If the long
  1228.      listing format is being used, print the last access time.
  1229.  
  1230. `-U'
  1231. `--sort=none'
  1232.      Do not sort; list the files in whatever order they are stored in
  1233.      the directory.  (Do not do any of the other unrelated things that
  1234.      `-f' does.)  This is especially useful when listing very large
  1235.      directories, since not doing any sorting can be noticeably faster.
  1236.  
  1237. `-X'
  1238. `--sort=extension'
  1239.      Sort directory contents alphabetically by file extension
  1240.      (characters after the last `.'); files with no extension are
  1241.      sorted first.
  1242.  
  1243. 
  1244. File: fileutils.info,  Node: General output formatting,  Next: Formatting the file names,  Prev: Sorting the output,  Up: ls invocation
  1245.  
  1246. General output formatting
  1247. -------------------------
  1248.  
  1249.    These options affect the appearance of the overall output.
  1250.  
  1251. `-1'
  1252. `--format=single-column'
  1253.      List one file per line.  This is the default for `ls' when standard
  1254.      output is not a terminal.
  1255.  
  1256. `-C'
  1257. `--format=vertical'
  1258.      List files in columns, sorted vertically.  This is the default for
  1259.      `ls' if standard output is a terminal.  It is always the default
  1260.      for the `dir' and `d' programs.
  1261.  
  1262. `--color [=WHEN]'
  1263.      Specify whether to use color for distinguishing file types.  WHEN
  1264.      may be omitted, or one of:
  1265.         * none Do not use color at all.  This is the default.
  1266.  
  1267.         * auto Only use color if standard output is a terminal.
  1268.  
  1269.         * always Always use color.  Specifying `--color' and no WHEN is
  1270.      equivalent to `--color=always'.
  1271.  
  1272. `-F'
  1273. `--classify'
  1274.      Append a character to each file name indicating the file type.
  1275.      Also, for regular files that are executable, append `*'.  The file
  1276.      type indicators are `/' for directories, `@' for symbolic links,
  1277.      `|' for FIFOs, `=' for sockets, and nothing for regular files.
  1278.  
  1279. `--full-time'
  1280.      List times in full, rather than using the standard abbreviation
  1281.      heuristics.  The format is the same as `date''s default; it's not
  1282.      possible to change this, but you can extract out the date string
  1283.      with `cut' and then pass the result to `date -d'.  *Note `date'
  1284.      invocation: (sh-utils)date invocation.
  1285.  
  1286.      This is most useful because the time output includes the seconds.
  1287.      (Unix filesystems store file timestamps only to the nearest
  1288.      second, so this option shows all the information there is.)  For
  1289.      example, this can help when you have a Makefile that is not
  1290.      regenerating files properly.
  1291.  
  1292. `-k'
  1293. `--kilobytes'
  1294.      If file sizes are being listed, print them in kilobytes.  This
  1295.      overrides the environment variable `POSIXLY_CORRECT'.
  1296.  
  1297. `-m'
  1298. `--format=commas'
  1299.      List files horizontally, with as many as will fit on each line,
  1300.      separated by `, ' (a comma and a space).
  1301.  
  1302. `-n'
  1303. `--numeric-uid-gid'
  1304.      List the numeric UID and GID instead of the names.
  1305.  
  1306. `-p'
  1307.      Append a character to each file name indicating the file type.
  1308.      This is like `-F', except that executables are not marked.
  1309.  
  1310. `-x FORMAT'
  1311. `--format=across'
  1312. `--format=horizontal'
  1313.      List the files in columns, sorted horizontally.
  1314.  
  1315. `-T COLS'
  1316. `--tabsize=COLS'
  1317.      Assume that each tabstop is COLS columns wide.  The default is 8.
  1318.      `ls' uses tabs where possible in the output, for efficiency.  If
  1319.      COLS is zero, do not use tabs at all.
  1320.  
  1321. `-w'
  1322. `--width=COLS'
  1323.      Assume the screen is COLS columns wide.  The default is taken from
  1324.      the terminal settings if possible; otherwise the environment
  1325.      variable `COLUMNS' is used if it is set; otherwise the default is
  1326.      80.
  1327.  
  1328. 
  1329. File: fileutils.info,  Node: Formatting the file names,  Prev: General output formatting,  Up: ls invocation
  1330.  
  1331. Formatting the file names
  1332. -------------------------
  1333.  
  1334.    These options change how file names themselves are printed.
  1335.  
  1336. `-b'
  1337. `--escape'
  1338.      Quote nongraphic characters in file names using alphabetic and
  1339.      octal backslash sequences like those used in C.
  1340.  
  1341. `-N'
  1342. `--literal'
  1343.      Do not quote file names.
  1344.  
  1345. `-q'
  1346. `--hide-control-chars'
  1347.      Print question marks instead of nongraphic characters in file
  1348.      names.  This is the default.
  1349.  
  1350. `-Q'
  1351. `--quote-name'
  1352.      Enclose file names in double quotes and quote nongraphic
  1353.      characters as in C.
  1354.  
  1355. 
  1356. File: fileutils.info,  Node: dir invocation,  Next: vdir invocation,  Prev: ls invocation,  Up: Directory listing
  1357.  
  1358. `dir': Briefly list directory contents
  1359. ======================================
  1360.  
  1361.    `dir' (also installed as `d') is equivalent to `ls -C'; that is,
  1362. files are by default listed in columns, sorted vertically.
  1363.  
  1364.    *Note `ls': ls invocation.
  1365.  
  1366. 
  1367. File: fileutils.info,  Node: vdir invocation,  Next: dircolors invocation,  Prev: dir invocation,  Up: Directory listing
  1368.  
  1369. `vdir': Verbosely list directory contents
  1370. =========================================
  1371.  
  1372.    `vdir' (also installed as `v')is equivalent to `ls -l'; that is,
  1373. files are by default listed in long format.
  1374.  
  1375. 
  1376. File: fileutils.info,  Node: dircolors invocation,  Prev: vdir invocation,  Up: Directory listing
  1377.  
  1378. `dircolors': Color setup for `ls'
  1379. =================================
  1380.  
  1381.    `dircolors' outputs a sequence of shell commands to set up the
  1382. terminal for color output from `ls' (and `dir', etc.).  Typical usage:
  1383.  
  1384.      eval `dircolors [OPTION]... [FILE]`
  1385.  
  1386.    If FILE is specified, `dircolors' reads it to determine which colors
  1387. to use for which file types and extensions.  Otherwise, a precompiled
  1388. database is used.  For details on the format of these files, run
  1389. `dircolors --print-data-base'.
  1390.  
  1391.    The output is a shell command to set the `LS_COLOR' environment
  1392. variable.  You can specify the shell syntax to use on the command line,
  1393. or `dircolors' will guess it from the value of the `SHELL' environment
  1394. variable.
  1395.  
  1396.    The program accepts the following options.  Also see *Note Common
  1397. options::.
  1398.  
  1399. `-b'
  1400. `--sh'
  1401. `--bourne-shell'
  1402.      Output Bourne shell commands.  This is the default if the `SHELL'
  1403.      environment variable is set and does not end with `csh' or `tcsh'.
  1404.  
  1405. `-c'
  1406. `--csh'
  1407. `--c-shell'
  1408.      Output C shell commands.  This is the default if `SHELL' ends with
  1409.      `csh' or `tcsh'.
  1410.  
  1411. `-p'
  1412. `--print-data-base'
  1413.      Print the (compiled-in) default color configuration database.  This
  1414.      output is itself a valid configuration file, and is fairly
  1415.      descriptive of the possibilities.
  1416.  
  1417. 
  1418. File: fileutils.info,  Node: Basic operations,  Next: Special file types,  Prev: Directory listing,  Up: Top
  1419.  
  1420. Basic operations
  1421. ****************
  1422.  
  1423.    This chapter describes the commands for basic file manipulation:
  1424. copying, moving (renaming), and deleting (removing).
  1425.  
  1426. * Menu:
  1427.  
  1428. * cp invocation::               Copy files.
  1429. * dd invocation::               Convert and copy a file.
  1430. * install invocation::          Copy files and set attributes.
  1431. * mv invocation::               Move (rename) files.
  1432. * rm invocation::               Remove files or directories.
  1433.  
  1434.