NAME
RezDet - Resource Detective
SYNOPSIS
RReezzDDeett rreessoouurrcceeFFiillee11 [[rreessoouurrcceeFFiillee22]]...... [[-bb[[iigg]]]] [[-uusseeDDFF]] [[-nnooRReessoollvvee]]
[-d[ump] | -l[ist] | -q[uiet] | -r[awdump] | -s[how] | -t[erse]]
DESCRIPTION
RReezzDDeett 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, RReezzDDeett 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 theend-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 thatRezDet 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: RReezzDDeett does not use the Resource Manager and should not crash no matter how corrupt the resource fork of a file is. IINNPPUUTTOne or more files (resourceFile). The RezDet ol os o ra
standard input. OOUUTTPPUUTT SSttaannddaarrdd oouuttppuutt.. RReezzDDeett writes error messages to diagnostic output. Ifyou 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. SSTTAATTUUSS RReezzDDeett can return the following status codes: 00 no errors 11 syntax error (invalid options or no files specified) 22 resource format error33 fatal error-an I/O or program error
PPAARRAAMMEETTEERRSS resourceFile1 [ resourceFile2 ] ... Specifies one or more resource files to be checked. OOPPTTIIOONNSS-bb[[iigg]] 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 RReezzDDeett tells you that it ran out of memory or that memory is badly fragmented.-uusseeDDFF Reads and writes resource information from the files' data
forks, instead of their resource forks.-nnooRReessoollvvee
Prevents the resolution of leaf aliases in the input resource file path. This allows the resources in a Finder alias file to be checked.-dd[[uummpp]]
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.-ll[[iisstt]]
Lists resource types, IDs, names, attributes, and resource sizes. Output appears in the following format: 'type' (ID, name, attributes) [size]-qq[[uuiieett]]
Returns a status code instead of generating error messages.-rr[[aawwdduummpp]]
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, RReezzDDeett 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 noerrors were found. Similar to the -q option, but allows error
messages to display. EEXXAAMMPPLLEESS The following command line checks the System file.RReezzDDeett "{SystemFolder}System" -big
If the file is damaged, RReezzDDeett 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.RReezzDDeett Test.c -q || Delete Test.c
LLIIMMIITTAATTIIOONNSS The RReezzDDeett tool does not validate the file attributes field in theresource 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.
COPYRIGHTRReezzDDeett 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)