


     LOOK(U1)             LS-DOS 6 - Utilities 1              LOOK(U1)



     Name
          LOOK - Determines the format of alien-format diskettes and
          displays the position of files on LS-DOS, LDOS or TRSDOS 6
          disks.

     Syntax
          look [ -ampqtu!?h ] [[:]drive] [ -f filename:drive ]
          [ -c cylinder [ -g granule | -s sector ]]
          [ >[>] file | device ] [ ; next command ]

     Description
          Look analyzes a diskette and determines how it is formatted.
          Diskettes formatted by numerous other computers and
          operating systems can be identified.  Look is also able to
          tell the difference between an unformatted diskette and a
          formatted one, even if look doesn't know what format the
          diskette is in.

          Look will also recognize selected system formats that are
          recorded in the high-density formats that are commonly used
          today.  These include MS/PC-DOS HD, Tandy 16/6000 XENIX, and
          Tandy Model II/12/16 TRSDOS II.  (Although look can
          recognize these formats, the data on these diskettes cannot
          be read by a Model III/4 system due to limitations in the
          hardware.)

          If the disk being examined is recorded in LS-DOS, LDOS or
          TRSDOS 6 format, look can display the locations of the files
          on the disk.  This information can be used to help recover
          data on corrupted disks, disks with read errors, or to
          examine fragmentation of files.

          Depending on the parameters, look will display information
          on all files located on a disk, or information on one
          specific file.  You can also specify a location on the disk
          and look will tell you what file resides there.

          When a full display is used, each line shows the files that
          are stored in a given cylinder.  If a cylinder has more than
          four granules, the information is displayed on two lines.
          The extent number for each granule of a file is also
          displayed.

          Look accepts several options.  Options are specified by
          single characters, and they may be entered in upper or
          lowercase.  Options are always preceded by a hyphen (a "-").
          If you are specifying multiple options, you can specify the
          options in any of these formats:
                -a -b -c   or   -abc   or   -a -bc   or  -ab -c






     Page 1                                             May 15th, 1993






     LOOK(U1)             LS-DOS 6 - Utilities 1              LOOK(U1)



          The options are:

          -a   The summary of the media type and its organization will
               not be displayed.  This option is the opposite of -t
               and only works on LS-DOS, LDOS and TRSDOS 6 disks.

          -m or -p
               This option routes the output of look through the
               more(U1) utility.  The screen will pause once 23 lines
               of text have been displayed.  The more(U1) prompt
               ("--More--") allows you to advance or search through
               the remainder of the display.  See the more(U1) command
               for information on the options that more(U1) provides.
               The -p and -m options are ignored if the output is
               redirected.

          -q   The headers and other general information are not
               displayed.

          -t   The summary on the media type and its organization is
               displayed but no allocation map is produced.  This
               command is the opposite of -a and only works on LS-DOS,
               LDOS and TRSDOS 6 disks.

          -u   Cylinders that are completely unassigned are not
               displayed in the allocation map.  This option is
               ignored if -f or -c are used.  This command only works
               on LS-DOS, LDOS and TRSDOS 6 disks.

          -!   Causes look to ignore any default settings that are
               specified in the DEFAULTS/MAD file.  Look will also
               ignore any options that are specified to the left of
               the -! option.  Note that the DEFAULTS/MAD file is
               accessed even if the -! option is specified.

          -? or -h
               Displays the help message.

          [:]drive
               Specifies the logical drive that contains the disk to
               analyze.  The logical drive number can be a diskette,
               hard disk, or DiskDisk(M).  A drive number must be
               specified unless the -f option is used.

          -f filename:drive
               Locates the granules that the specified file occupies.
               This command only works on LS-DOS, LDOS and TRSDOS 6
               disks.  The drive number must be specified.







     Page 2                                             May 15th, 1993






     LOOK(U1)             LS-DOS 6 - Utilities 1              LOOK(U1)



          -c cylinder
               By specifying a particular cylinder and a sector or a
               granule, look will determine which file is assigned to
               that location on the disk.  The cylinder number can be
               specified in decimal, or in hexadecimal by preceding
               the number with 0x, such as 0x14.

               When -c is specified, -g or -s must also be specified.
               The -c option cannot be used with the -f option.

          -g granule
               Used with the -c option.  -g is used to specify the
               granule to analyze.   -g cannot be used with -s or -f.

          -s sector
               Used with the -c option.  -s is used to specify the
               sector to analyze.   -s cannot be used with -g or -f.

          >[>] file | device
               By specifying a file or device, the output is sent to
               the specified file or device instead of the display.
               This is known as redirected output.  For example, the
               command look :1 > type:0 stores the output of look in
               the file TYPE:0.  If >> is used, look will append the
               output of look to the existing contents of the
               specified file or device.  Filespecs for redirection
               may not specify a password.

          ; next command
               After look completes, the remainder of the command line
               is executed as a second command.  The command look
               :5;time will report on the disk in drive 5, and then
               the time will be displayed.

          <SHIFT>@
               When pressed during output to the display, the output
               will pause.  Pressing any other key resumes output.
               Pressing this key is ignored when output is redirected.


     Files
          Look reads the DEFAULTS/MAD file and uses any default
          options that are specified there.  For example, if you
          wanted look to omit the headers by default, the following
          entry in the DEFAULTS/MAD file would do this:
                      LOOK -Q
          Options in the DEFAULTS/MAD file are ignored if the -!
          option is specified on the command line.

          It is important that the DEFAULTS/MAD file be present on a
          logical drive with a number lower than the floppy drives you
          may use to test alien diskettes.  Look will search for the



     Page 3                                             May 15th, 1993






     LOOK(U1)             LS-DOS 6 - Utilities 1              LOOK(U1)



          DEFAULTS/MAD file until it is found or all disk drives have
          been checked.  Some alien diskette formats can confuse LS-
          DOS/TRSDOS 6 and may hang the operating system if this
          search tries to examine an alien diskette.  (MS-DOS
          diskettes will do this.)  By placing DEFAULTS/MAD on a drive
          with a logical number lower than the test floppy drive you
          use, you can prevent LS-DOS/TRSDOS 6 from accidentally
          trying to read an alien diskette.  The best performance can
          be obtained by placing the DEFAULTS/MAD file on drive 0.

          Look uses the LOOK/INI file to identify disks made by
          operating systems other than LS-DOS, LDOS or TRSDOS 6.  The
          LOOK/INI file contains signatures that are compared against
          the diskette being tested.  When a match is made, the
          description from the LOOK/INI file is displayed.

          The LOOK/INI file that is included with look(U1) contains
          signatures so that look can recognize these alien formats:
                TRSDOS 1.1, 1.3, 2.3, 2.7DD   NEWDOS 2.0, 2.5
                MULTIDOS 1.6, 1.7             MS/PC-DOS (low cap)
                MODEL 100/200                 Various CP/M formats
                Color Computer                Datasoft

          Additional entries can be added to the LOOK/INI file so that
          more formats can be recognized.  This file can be modified
          with almost any editor.

          Each entry in LOOK/INI starts at the beginning of a line and
          has the following format:

                sector size, cylinder, sector, offset, count
                pattern  "string"

          Here is an example of an entry in the LOOK/INI file:
                1,0,1,0,6  0x01,0x00,0x00,0x4e,0x58,0x5a  "TRSDOS 2.3"
          Each parameter is described below.

          The sector size is a number and must be one of the
          following:
                0     for 128 byte sectors (3740 format)
                1     for 256 byte sectors (most Model III/4 formats)
                2     for 512 byte sectors (some CP/M and all MS-DOS
                      formats)
                3     for 1024 byte sectors (no known examples)

          The cylinder field specifies which cylinder is to be
          examined to test for this format.  The cylinder number is a
          value from 00 to 79.  You should avoid using a cylinder
          above 39 as part of your signature as these locations cannot
          be reached on a 40 cylinder drive and could damage the
          drive.




     Page 4                                             May 15th, 1993






     LOOK(U1)             LS-DOS 6 - Utilities 1              LOOK(U1)



          The sector field specifies which sector is to be read to
          test for this format.  Note that look will run faster if you
          keep all the entries that specify the same sector size,
          cylinder and sector number together.  The sector will only
          have to be read from the diskette a single time if you do
          this.

          The offset field specifies where in the sector to start
          comparing for the pattern that is to be tested.  In most
          cases, this value will be zero.

          The count field indicates how many bytes are specified in
          the pattern field.  Note that this is the count of bytes
          specified, and this includes any escape characters.  The
          count and pattern fields are separated by one or more
          spaces.

          The pattern consists of one or more bytes (as specified by
          count) that are compared against the data read from the
          diskette.  If the pattern completely matches the data on the
          diskette, the format has been found.

          Look recognizes two escape sequences in the pattern field.
          The sequence 0xff 0x00 will match any character in this
          position on the diskette being tested.  This is used to skip
          a byte that changes on diskettes of the same format.  A good
          example of the use of the "wildcard" sequence would be on a
          LDOS, LS-DOS or TRSDOS 6 diskette, as these systems place
          the number of the directory cylinder in the boot sector.
          The remaining bytes at the start of the boot sector never
          change in these operating systems, so by telling look to
          skip the one byte, a single entry in the LOOK/INI file can
          be used to identify all of these formats.

          The other escape sequence is 0xff 0xff, which is treated as
          a single occurrence of 0xff.  If a 0xff appears in the
          sector on the diskette you want to test, you must use 0xff
          0xff in the pattern to match it.

          Finally, the string field contains the description that look
          will display when a match is found in the LOOK/INI file.
          The string must be enclosed in double-quotes and will be
          displayed exactly as it appears.  The description must be
          completely on one line.  Disk formats that have a directory
          structure identical to LDOS, LS-DOS or TRSDOS 6 should place
          a plus ("+") as the first character of the string field.
          This informs look that the file allocation maps can be
          computed and displayed for this disk.  (Using this character
          on incompatible formats will have unpredictable results.)






     Page 5                                             May 15th, 1993






     LOOK(U1)             LS-DOS 6 - Utilities 1              LOOK(U1)



          Entries in the LOOK/INI can be broken across one or more
          lines by using the back-slash character ("\") at the end of
          the line being split.  You must split the line between
          entries, and you cannot split the string field across two or
          more lines.  For example:
                2,0,1,0,12 0xeb,0x3c,0x90,0x49,0x42,0x4d,0x20,0x20 \
                            0x35,0x2e,0x30,0x00 \
                            "MS-DOS 5.0"
          Note that the comma between fields is implied when a line is
          split, and must not be included.  Extra spaces between
          fields are ignored.

          In most cases, any new entries should follow the entries for
          that sector size and cylinder/sector numbers that are
          already in the file.

          Finally, you can place comments in the LOOK/INI file.  Lines
          that start with a # are ignored.  Try to keep comments to a
          minimum, as the presence of large numbers of comments will
          affect the speed of look.


          If you need more information on look(U1) or if you want to
          obtain the LDOS 5.3 version, please write to M.A.D.
          Software, P.O. Box 331323, Ft. Worth Texas, 76163.  Please
          include a Self-Addressed-Stamped-Envelope when requesting
          information.
          ------
          305152


























     Page 6                                             May 15th, 1993



