home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #2 / RBBS_vol1_no2.iso / 014r / ls.zip / LS.DOC next >
Text File  |  1985-07-15  |  8KB  |  196 lines

  1. ls.doc                                                                 Page  1
  2.  
  3.  
  4. (c)Copyright 1985 by Craig Anderson.  All rights reserved.
  5.  
  6.     Individuals, clubs, and other non-profit organizations are granted 
  7.     permission by the author to freely copy the ls program and documentation,
  8.     as long as no price or other consideration is changed, and the program
  9.     or documentation are not modified in any way and are distributed together.
  10.  
  11.     You are encouraged to copy and share this program with others, if you
  12.     find this program useful, please send a few dollars to:
  13.  
  14.                 Craig Anderson
  15.                 2845 Alpine Street SE
  16.                 Auburn, WA   98002
  17.  
  18.     Contributions of $10 or more will recieve a copy of the ls source code.
  19.     Comments and suggestions are always welcome!
  20.  
  21.  
  22. Description:
  23.  
  24.     This is an improved directory listing program.  It is meant to be used
  25.     with hard disks (or floppy disk systems only if ls is on a ram disk).
  26.     It provides directory listings in various formats, with many options
  27.     for sorting and selection.
  28.  
  29.     The default sorting is alphabetical so you can find the file your looking
  30.     for without searching an almost unordered list.  The -z option provides
  31.     useful file searches across directories.
  32.  
  33.     It was originally more Unix like, but has undergone a metamorphosis to
  34.     make it more useful in the DOS environment.  Multiple names may appear
  35.     on the command line to list more than one file or group of files.
  36.     The metacharacters * and ? are supported as usual.
  37.  
  38.  
  39. Usage:
  40.  
  41.     ls [names] [options]
  42.  
  43.  
  44. Names:
  45.  
  46.     [drive:][path][filename]
  47.  
  48.     Optional drive followed by a ':', defaults to current drive.
  49.  
  50.     Optional path, defaults to current directory.
  51.     To list files for a directory, the path must be followed
  52.     by a '\'.  This program differs from the DOS dir command in
  53.     that the following '\' must be used.
  54.  
  55.     Optional filename, defaults to showing all files (except 
  56.     hidden and system files) in the directory.
  57.  
  58.     More than one name may be used (e.g. "ls a*.com b*.com" will list
  59.     all .com files starting with 'a' or 'b'.)
  60. ls.doc                                                                 Page  2
  61.  
  62.  
  63. Options:
  64.  
  65.     Options can appear before or after the [names] and are preceded by a
  66.     '-' or a '/'.  As many options as wanted can follow a single '-' or
  67.     '/' without spaces.  (e.g.  "ls -laf" is the same as "ls -l -a -f".)
  68.     Options may be upper or lower case letters as follows:
  69.  
  70.     -a      Show all files. 
  71.             Hidden and system files are also listed.
  72.  
  73.     -b      Directories are not appended with a  '\'.
  74.  
  75.     -c      Show copyright notice.
  76.  
  77.     -d      Show only directories.
  78.             Files (which are not directories) are not listed.
  79.  
  80.     -e      Sort files by extension.
  81.             Files are sorted alphabetically by extension then by name.
  82.             Directories are listed first.
  83.  
  84.     -f      Show only files.
  85.             Directories are not listed.
  86.  
  87.     -g      Puts directories first.
  88.             Directories are listed before any files.  Both directories 
  89.             and files are listed by the sorting type chosen.
  90.  
  91.     -h      Help.
  92.             Prints a list of options followed by a short description.
  93.             This is also printed when an unknown option is used.
  94.  
  95.     -l      Long listing
  96.             Lists files attributes, file size (in bytes), creation
  97.             date and time, and filename.  The total number of files
  98.             listed and the total size are also shown.
  99.             The file attributes are shown in the following form:
  100.                 dshrwa    
  101.             If the attribute is not on then a '-' is shown instead.
  102.             where:
  103.                 d   shows the file is a directory.
  104.                 s   the file is a system file (excluded from normal
  105.                     directory searches, use -a option)
  106.                 h   the file is a hidden file (also excluded from normal
  107.                     directory searches, use -a option).
  108.                 r   The file is readable (always on).
  109.                 w   the file is writeable (if this is a '-' then the
  110.                     file is read only).
  111.                 a   The file has not been modified since the last
  112.                     backup.
  113.             normal files show ( ---rw- ), hopefully ( ---rwa) if backups
  114.             have been done.
  115.  
  116.     -m      Stream output.
  117.             Filenames are separated only by commas.
  118. ls.doc                                                                 Page  3
  119.  
  120.  
  121.     -n      Natural sort (unsorted).
  122.             The files are listed in the order they appear in the 
  123.             DOS directory.
  124.  
  125.     -p      Shows only programs.
  126.             Only files ending in '.exe' or '.com' are listed.
  127.             This is especially usefull in finding the executable
  128.             program in the midst of many data files.
  129.  
  130.     -q      Shows only programs and batch files.
  131.             Only files ending in '.exe', '.com', or '.bat' are
  132.             listed.  
  133.  
  134.     -r      Reverse listing.
  135.             Reverses the order of any of the sorting criteria chosen.
  136.  
  137.     -s      Sort by size.
  138.             Files are listed in order of increasing size.
  139.  
  140.     -t      Sort files by time.
  141.             Files are listed in the order of increasing age. (Most
  142.             recent files shown first.)
  143.  
  144.     -u      Listing in uppercase.
  145.             Listing is shown in uppercase letters instead of the 
  146.             default lowercase.
  147.  
  148.     -w#     Sets the number of columns.
  149.             Lists files in # columns where # is 1 - 5 (default 4).
  150.  
  151.     -z      Recursive directory listing.
  152.             Lists all files matching [names] in the current directory
  153.             or any subdirectory below the current directory.
  154.             The path is printed for each directory in which one or
  155.             more files are listed, followed by the files.
  156.             Thus to print all batch and 'com' files on the disk type:
  157.                 "cd \"               (move to topmost directory)
  158.                 "ls -z *.bat *.com"        (lists all batch and 'com' files)
  159.             This option is also valuable when trying to find a file.
  160.                 "cd \"
  161.                 "ls -fz <filename>"
  162.             will show the directory of the file(s) in filename.  The
  163.             -f option lists only files so subdirectories matching the
  164.             filename patter will not be shown.
  165.  
  166.  
  167. Environment Variables:
  168.  
  169.     The environment variable LSOPTIONS can be used to set options
  170.     for the ls command.
  171.     This is useful to always turn the uppercase (-u) option on, to
  172.     set the number of columns (-w#), or to always show directories
  173.     first (-g), etc.
  174. ls.doc                                                                 Page  4
  175.  
  176.     usage:
  177.  
  178.         set LSOPTIONS=options
  179.  
  180.     Where options are any of options above and must be preceded by a    
  181.     '-' or a '/'.
  182.     
  183.     Placed in the autoexec.bat file on the boot disk the following
  184.     line sets the defaults to 5 columns are always lists directories
  185.     first:
  186.  
  187.         set LSOPTIONS = -w5g
  188.  
  189.     Options on the command line may overide these options (e.g.
  190.     "ls -w4" will list files in 4 columns instead on the LSOPTIONS
  191.     set default of 5.)
  192.  
  193.     Note:
  194.         Some options cannot be overidden on the command line (-u, -g,
  195.         and -q for example.)
  196.