Revision 88d0a458d499c9e60b972448de42f2b9acf6453b authored by Ken Thompson on 06 November 1973, 00:41:35 UTC, committed by Ken Thompson on 06 November 1973, 00:41:35 UTC
Work on file man/man2/break.2
Work on file man/man2/chdir.2
Work on file man/man2/chmod.2
Work on file man/man2/chown.2
Work on file man/man2/close.2
Work on file man/man2/csw.2
Work on file man/man2/dup.2
Work on file man/man2/exit.2
Work on file man/man2/fork.2
Work on file man/man2/fstat.2
Work on file man/man2/getgid.2
Work on file man/man2/getuid.2
Work on file man/man2/indir.2
Work on file man/man2/kill.2
Work on file man/man2/link.2
Work on file man/man2/mount.2
Work on file man/man2/open.2
Work on file man/man2/pipe.2
Work on file man/man2/read.2
Work on file man/man2/seek.2
Work on file man/man2/sleep.2
Work on file man/man2/stat.2
Work on file man/man2/stime.2
Work on file man/man2/stty.2

Co-Authored-By: Dennis Ritchie <dmr@research.uucp>
Synthesized-from: v4
1 parent 89372e2
Raw File
dir.5
.th DIRECTORY V 9/10/73
.sh NAME
dir \*- format of directories
.sh DESCRIPTION
A directory
behaves exactly like an ordinary file, save that no
user may write into a directory.
The fact that a file is a directory is indicated by
a bit in the flag word of its i-node entry.
Directory entries are 16 bytes long.
The first word is the i-number of the file represented
by the entry, if non-zero; if zero, the entry is empty.
.s3
Bytes 2-15 represent the (14-character)
file name, null padded on the right.
These bytes are not cleared for empty slots.
.s3
By convention, the first two entries in each directory
are for ``\fB.\fR'' and ``\fB..\fR''.  The first is an entry for the
directory itself.  The second is for the parent
directory.
The meaning of ``\fB..\fR'' is modified for the root directory
of the master file system and for the root directories of removable
file systems.
In the first case, there is no parent, and in the second,
the system does not permit off-device references.
Therefore in both cases ``\fB..\fR'' has the
same meaning as ``\fB.\fR''.
.sh "SEE ALSO"
file system (V)
back to top