home *** CD-ROM | disk | FTP | other *** search
/ ftp.update.uu.se / ftp.update.uu.se.2014.03.zip / ftp.update.uu.se / pub / rainbow / msdos / decus / RB129 / ls.doc < prev    next >
Text File  |  1995-06-04  |  8KB  |  258 lines

  1.         LS 3.4                     List Files                      Page 1
  2.  
  3.  
  4.  
  5.         Directory lister ala Unix for generic MS-DOS 2.0 or higher.
  6.         Advantages (admittedly a matter of (good) taste) over DIR:
  7.  
  8.              o Alphabetical order by default
  9.              o Default is "wide" (/W in DIR-speak)
  10.              o Default is to omit ".", "..", hidden files, and volume ID
  11.              o Lists day of week (Monday, Tuesday ...)
  12.              o Uses 24-hour time
  13.              o Lists byte-count & directory-count totals
  14.              o Shows file attributes
  15.              o Flags directories
  16.              o Prints commas in large numbers
  17.              o Pauses on full screen ("More")
  18.  
  19.         Useful options:
  20.  
  21.              o List only files dated after a given date
  22.              o List only files changed since last backup
  23.              o Recursively list sub-directories
  24.              o Show remaining space on drive only
  25.              o Show total file space only
  26.              o Sort by file date & time
  27.              o Sort by file extension
  28.              o Sort by file size
  29.              o Exclude files from listing
  30.              o Feed file list into filter
  31.  
  32.         LS is intended for use with a Winchester or RAM disk.  There is a
  33.         slight delay on large directories as LS must read up all
  34.         directory entries and sort them before displaying the first.
  35.  
  36.         Usage:
  37.  
  38.              ls [-abcdefghlmnorstuvxy2] [-w[<date>]] [<file>] ...
  39.  
  40.         The square brackets indicate optional arguments.
  41.  
  42.         <file> indicates a file specification of the form accepted by
  43.         DIR, formally:
  44.  
  45.              [<drive>:][<path>][<name>][.[<ext>]]
  46.  
  47.         All components are optional and have the same defaults as DIR.
  48.         The <name> and <ext> portions may contain wildcard characters.
  49.  
  50.         A plain
  51.  
  52.              ls
  53.  
  54.         will list all files in the current directory (except hidden
  55.         files, volume ID, ".", and "..") sorted alphabetically, five per
  56.         line.  The number of files matched is always given, along with
  57.         the total byte count of files matched.  Directory names are
  58.         appended with a backslash.
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.         LS 3.4                     List Files                      Page 2
  68.  
  69.  
  70.         The options are as follows (mnemonics given in parentheses)
  71.  
  72.              -a (All) List ".", "..", hidden files, and volume ID if
  73.                 matched
  74.              -b (But) Inverts the meaning of -c -d -t -y and -w (see
  75.                 below)
  76.              -c (Changed) Restrict matches to files changed since backup
  77.              -d (Directories) Restrict matches to directories
  78.              -e (Extension) Sort alphabetically on file extension
  79.              -f (Filter) Single-column (filter-ready) listing
  80.              -g (Go) Don't pause for user go-ahead when screen fills
  81.              -h (Hugest) Sort by size, largest to smallest
  82.              -l (Long) Long listing: dates, sizes & attributes
  83.              -m (Minisculest) Sort by size, smallest to largest
  84.              -n (Newest) Sort by date & time, newest to oldest
  85.              -o (Oldest) Sort by date & time, oldest to newest
  86.              -r (Recursive) Search subdirectories recursively
  87.              -s (Summary) List only total counts and sizes
  88.              -t (Today) Restrict matches to files dated today
  89.              -u (Unused) Shows space remaining on drive (no files listed)
  90.              -v (Version) Show LS version only
  91.              -w (When) Restrict matches to files dated on or after a
  92.                 given date, where <date> is one of
  93.  
  94.                        o A full date, e.g. 11/22/85
  95.                        o A day in the current year, e.g. 11/22
  96.                        o A day of the current month, e.g. 22
  97.                 
  98.                 A missing date restricts matches to files dated in the
  99.                 current week, beginning on Monday (Week)
  100.  
  101.              -x (eXcept) Don't list files matching subsequent arguments
  102.              -y (Yesterday) Restrict matches to files dated yesterday or
  103.                 today
  104.              -2 (2-column) 2-column version of long listing, omitting
  105.                 some of the information given with -l
  106.              -? (Huh?) Show command format
  107.  
  108.         Options may be combined, e.g.
  109.  
  110.              ls -aln *.c
  111.  
  112.         or segregated:
  113.  
  114.              ls -a *.c -ln
  115.  
  116.         The -w option should be last (or alone) in a group.
  117.  
  118.         The -b option inverts the meaning of -c -d -t -w and -y; thus
  119.  
  120.              ls -bd
  121.  
  122.         will list all non-directory files,
  123.  
  124.              ls -bt .exe
  125.  
  126.         will list all .EXE files but those dated today, and
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.         LS 3.4                     List Files                      Page 3
  134.  
  135.              ls -bw1/1/85
  136.  
  137.         will list all files dated before 1985.
  138.  
  139.         The -x option excludes from the listing files matching ALL subse-
  140.         quent arguments (this is a change from former versions), thus
  141.  
  142.              ls -x *.c .asm
  143.  
  144.         means list all files except .C files and .ASM extensions, and
  145.  
  146.              ls p*.* -x *.exe
  147.  
  148.         means list all files beginning with P except .EXE files.
  149.  
  150.         In the attributes given in the long (-l) listing, W means read/
  151.         write, R means read-only, H means hidden, S means system file,
  152.         and A means changed since last archive (backup).
  153.  
  154.         Two byte counts are given with -l.  The first is the number of
  155.         bytes of data in the file; the second is the amount of room the
  156.         file takes up on the disk (disk space is allocated in largish
  157.         fixed-size increments).
  158.  
  159.         The -s option does not list file names, but rather gives a
  160.         summary of the count and total size of the files specified.
  161.  
  162.         The -f option is intended for use with filters; matching files
  163.         are listed one per line, with no heading or summary information.
  164.  
  165.         Only one of the -e, -h, -m, -n, or -o sorting options should be
  166.         given.
  167.  
  168.         If the screen fills and neither standard input nor standard
  169.         output have been redirected, LS pauses and prompts with
  170.  
  171.              More?
  172.  
  173.         An answer of 'N' or 'n' (No) or '^C' will terminate LS; 'G' or
  174.         'g' (Go) continues with no more pauses; anything else continues
  175.         to the next screen full.  The -g option can be used to override
  176.         this feature.
  177.  
  178.         Examples:
  179.  
  180.              o All ordinary files in current directory
  181.  
  182.                   ls
  183.  
  184.              o All non-directory files
  185.  
  186.                   ls -bd
  187.  
  188.              o Long listing of files LS.*
  189.  
  190.                   ls -l ls
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.         LS 3.4                     List Files                      Page 4
  200.  
  201.  
  202.              o Long listing of files dated today:
  203.  
  204.                   ls -alt
  205.  
  206.              o Files dated this week
  207.  
  208.                   ls -w
  209.  
  210.              o All .EXE files, newest to oldest:
  211.  
  212.                   ls -n .exe
  213.  
  214.              o All .C files dated on or after November 3, 1984
  215.  
  216.                   ls -w11/3/84 .c
  217.  
  218.              o All files dated this year, oldest to newest
  219.  
  220.                   ls -lw1/1 -o
  221.  
  222.              o All files dated on or after the 3rd of this month
  223.  
  224.                   ls -w3
  225.  
  226.              o All non-.EXE and non-.COM files, sorted by extension
  227.  
  228.                   ls -x .exe .com -e
  229.  
  230.              o Count size and number of .exe files in current directory
  231.                and below:
  232.  
  233.                   ls -rs .exe
  234.  
  235.              o List all files on current disk not backed up:
  236.  
  237.                   ls -cr \
  238.  
  239.              o Get count and size of all files on current disk not backed
  240.                up:
  241.  
  242.                   ls -crs \
  243.  
  244.              o List all directories on the disk
  245.  
  246.                   ls -rfd \
  247.  
  248.  
  249.  
  250.         Copyright (c) 1985,86,87, Bryan Higgins.
  251.  
  252.         The author may be reached/rewarded at
  253.  
  254.                 1802 Channing Way
  255.                 Berkeley, CA 94703
  256.  
  257.         One of the Kramden Utilities.
  258.