.\" $HeadURL$ $LastChangedRevision$ .TH FAD 5 "ADE_APP_TOKEN_RELEASE_DATE_MAN" .ne 5 .SH NAME FAD \- File Attribute Database .br .SH DESCRIPTION A FAD file is a file describing the attributes of a set of filesystem objects in a format processable by the FAD tools, .B mkfad\fR(1), .B faddiff\fR(1), .B fadcat\fR(1) and .B fadscan\fR(1). .PP A FAD file consists of a FAD header and then zero or more FAD records, which are ordered on the first field according to the .B C\fR .B locale\fR(1). .PP The FAD header consists of lines separated by Unix newlines (octal 012). Each line consists of words separated by spaces (octal 040). The order of lines is as follows: .pp .nf .RS 10 .I magicnumber .I version-dependent-headers .B EOH .fi .PP which are: .RS 10 .TP 25 .I magicnumber literal text .B FaDFiLe .TP .I version-dependent-headers a mixture of mandatory and optional header lines (described in detail below) .TP .B EOH literal text marking the end of the FAD header .RE .PP The mandatory headers lines are: .RS 10 .TP 25 .B FAD-Version \fIfad-version\fB literal text .B FAD-Version followed by the ASCII representation of the FAD version number with which the file is compliant (this should be .B 3\fR) .TP .B Field-Separator \fIfield-separator\fB literal text .B Field-Separator followed by the URI-encoded single character used to separate FAD fields within a single FAD record in the main body of the FAD file (see .B URI::Escape\fR(3)) .TP .B Record-Separator \fIrecord-separator\fB literal text .B Record-Separator followed by the URI-encoded single character used to separate FAD records in the main body of the FAD file (see .B URI::Escape\fR(3)) .TP .B Unix-Time \fIunix-time\fB literal text .B Unix-Time followed by the number of seconds after 1 January 1970 00:00 at which the FAD file was created. .RE .PP Any other header line is considered optional any is ignored. The FAD tools mentioned above do not write optional headers. .PP FAD records are ordered on ascending ASCII ordering of the first field. Records are separated by the designated record separator as specified in the FAD header. Fields within a record are separated by the designated field separator as specified in the FAD header. The fields are: .RS 10 .nf .I pathname .I empty_field .I empty_field .I type .I owner .I group .I mode .I hardlink_count .I content_signature .I other_hardlink_names .fi .RE .PP where these have the following meanings: .RS 10 .TP 25 .I pathname pathname of the object (does not have to be absolute) .TP .I empty_field FAD records in files have empty fields here, FAD records in memory have inode and device number information here .TP .I type single character indicating the object type, meanings are as follows: .RS 25 .TP 10 .B f file .TP .B d directory .TP .B p named pipe .TP .B l symbolic link .TP .B b block device .TP .B c character device .TP .B s socket .RE .TP 25 .I owner numeric object owner id .TP .I group numeric object group id .TP .I mode object access permissions in octal .TP .I hardlink_count number of hard links to the object (see CAVEATS below) .TP .I content_signature concise representation of the object's contents. This has meaning only for the when the .I type one of the following: .RS 25 .TP 10 .B f 32 bit checksum on the files contents .TP .B l symbolic link destination .TP .B b \fRor\fB c combined major and minor number .RE .TP 25 .I other_hardlink_names A list of all other names to which the object is hardlinked separated by the designated field separator .RE .br .ne 5 .SH EXAMPLES Below is a short FAD file: .nf .IP FaDFiLe FAD-Version 3 Field-Separator %3A Record-Separator %0A Unix-Time 954927096 EOH /:::d:0:0:40755:1:0 /bin/[:::f:0:0:100755:2:32424:/bin/test /bin/sh:::f:0:0:100755:1:2838 /bin/test:::f:0:0:100755:2:32424:/bin/[ /dev/null:::c:0:0:20666:1:770 .fi .RE .PP Notice that each hard linked file makes reference to all other names by which the files are linked, and that the major and minor numbers for device files are combined - as returned by Perl's .I stat() function. .br .ne 5 .SH CAVEATS Field and record separators in both the header and body of a FAD file are not currently variable. There should be no need for this anyway. .PP FAD files are 8-bit clean. However, in practice, it is impossible to pass the name of a file which has a newline in it to the FAD tools, because they will interpret it as two file names. This is desirable behaviour because it makes for better integration with Unix commands. .br .ne 5 .SH STANDARDS This manual page documents the FAD file format level 3 only. .br .ne 5 .SH SEE ALSO mkfad(1), faddiff(1), fadscan(1), fadcat(1), fadfixperms (1), perl(1), file(1), find(1), ls(1), URI::Escape(3), sort(1) .br .ne 5 .SH CHANGE HISTORY FAD file format level 1 was not eight-bit clean, used a single line FAD header (#F1), and used character 034 as a field separator. .PP FAD file format level 2.00 was eight-bit clean, used a multi-line FAD header, and used magic number sequence 0106 0106. .PP FAD file format level 2.01 used a fixed format header. .PP FAD file format level 2.02 introduces .B Unix-Time header and variable order header lines. .PP FAD file format level 3 introduces empty inode and device number fields, and a change to integer FAD format levels. .br .ne 5 .SH AUTHOR ADE_APP_TOKEN_AUTHOR_NAME .br .ne 5 .SH COPYRIGHT & DISTRIBUTION POLICY Copyright (C) 1995-ADE_APP_TOKEN_RELEASE_YEAR ADE_APP_TOKEN_AUTHOR_NAME .PP This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.