ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

This manual page is associated with the Mac OS X developer tools. The software or headers described may not be present on your Mac OS X installation until you install the developer tools package. This package is available on your Mac OS X installation DVD, and the latest versions can be downloaded from developer.apple.com.

For more information about the manual page format, see the manual page for manpages(5).



REZDET(1)                                                                                          REZDET(1)



NAME
       RezDet - Resource Detective

SYNOPSIS
       RezDet resourceFile1 [resourceFile2]... [-b[ig]] [-useDF] [-noResolve] [-d[ump] | -l[ist] | -q[uiet]
       | -r[awdump] | -s[how] | -t[erse]]


DESCRIPTION
       RezDet tool investigates the resource fork of the specified files for damage or inconsistencies.
       Files are read and checked one at a time, and messages are generated for each error, indicating the
       cause of the damage.  In determining the source of the errors, RezDet checks that the files meet the
       following conditions:

       - The resource fork contains the minimum number of bytes (enough to read a resource header).

       - The header, resource data list, and resource map do not overlap or contain spaces between them.
       There should not be any bytes between the end-of-file marker and the end of the resource map.

       - Each record in the resource data list is used once and only once and the last data item ends
       exactly where the data list ends.

       - Each item in the resource type list contains at least one reference; each sequence of referenced
       items starts where the reference list for the previous resource type item ends; and each item in the
       reference list is pointed to by one and only one resource type list item.

       - The resource type list does not contain any duplicates.

       - Each name in the name list has one and only one reference, and the last name does not point outside
       the name list.

       - All names have a nonzero length.

       - The name list does not contain any duplicates. Note that duplicate names cause an advisory warning
       rather than a true error and that RezDet does not generate this warning unless you also specify the
       -d, -r, or -s options.

       - Each reference list item points to a valid data item and either has a name list offset of -1 or
       points to a valid name list offset.

       - Bits 7 (reserved) and 1 (changed) are not set in the resource attributes.

       Note:  RezDet does not use the Resource Manager and should not crash no matter how corrupt the
              resource fork of a file is.


INPUT
       One or more files (resourceFile). The RezDet tool does not read standard input.


OUTPUT
       Standard output.  RezDet writes error messages to diagnostic output. If you specify -d, -l, -r, -s,
       or -t, the information produced by that option is written to standard output.  Note: For the options
       in which additional information is retrieved, fields are displayed as hexadecimal or decimal numbers
       for numeric values, or as a hex dump with associated printable Macintosh characters.


STATUS
       RezDet can return the following status codes:

       0  no errors
       1  syntax error (invalid options or no files specified)
       2  resource format error
       3  fatal error--an I/O or program error


PARAMETERS
       resourceFile1 [ resourceFile2 ] ...
              Specifies one or more resource files to be checked.



OPTIONS
       -b[ig] Reads the data for each resource into memory one resource at a time, instead of all at once.
              This is useful for checking huge resource files, such as the System file.

              Note: Try using this option if RezDet tells you that it ran out of memory or that memory is
              badly fragmented.

       -useDF Reads and writes resource information from the files' data forks, instead of their resource
              forks.

       -noResolve
              Prevents the resolution of leaf aliases in the input resource file path. This allows the
              resources in a Finder alias file to be checked.

       -d[ump]
              Generates the same information as the -s[how] option as well as detailed information about the
              resource header, type list, name list, resource map, and data list.

       -l[ist]
              Lists resource types, IDs, names, attributes, and resource sizes. Output appears in the
              following format: 'type' (ID, name, attributes) [size]

       -q[uiet]
              Returns a status code instead of generating error messages.

       -r[awdump]
              Generates the same information as the -d[ump] option but also dumps the contents of data
              blocks.

              Note: This option can generate huge amounts of output.

       -s[how]
              Writes information about individual resource types. For each type, RezDet provides the
              following information: the number of items of this type, the reference list offset, and
              detailed information on each ID (including the resource name, if any, resource attributes,
              data offset, and data length).

       -t[erse]
              Suppresses all messages that do not explicitly describe errors. Examples of such messages
              include the name of the current file and the statement that the file is OK in the event that
              no errors were found. Similar to the -q option, but allows error messages to display.


EXAMPLES
       The following command line checks the System file.

       RezDet "{SystemFolder}System" -big

       If the file is damaged, RezDet returns an error message such as this one:

       File "HD:System Folder:System"; ### RezDet -- Data inconsistency, 36 bytes left over.

       The following command line removes the Test.c file if its resource fork is damaged.

       RezDet Test.c -q || Delete Test.c


LIMITATIONS
       The RezDet tool does not validate the file attributes field in the resource map header and ignores
       the Finder-specific fields in the header and resource map header.

       Duplicate resource name warnings are generated when you specify -d, -r, or -s, even if the names
       belong to resources of different types.


COPYRIGHT
       RezDet is Copyright (c) 1986-2002, 2002, 2005 by Apple Computer, Inc.


AUTHORS
       Johan Strandberg, Tom Taylor, Mitch Adler, Cheryl Ewy, and Greg Branche.



Mac OS X                                      December 25, 2005                                    REZDET(1)

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.