File:  [Research Unix] / researchv10dc / man / man8 / icheck.8
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.TH ICHECK 8
.CT 1 sa_nonmortals
.SH NAME
icheck, dcheck, ncheck \- file system consistency check
.SH SYNOPSIS
.B /etc/icheck
[
option ... ]
.I filesystem ...
.PP
.B /etc/dcheck
[
option ... ]
.I filesystem ...
.PP
.B /etc/ncheck
[
option ... ]
.I filesystem ...
.SH DESCRIPTION
These programs perform
consistency checks on file systems.
For normal file system maintenance, see
.IR fsck (8).
Common options are
.TP
.B -B
The file system is bitmapped.
If
.I filesystem 
is a special file, this option is set automatically from
the minor device number.
.TP
.BI -i " number ...
Report only on specified inode
.I numbers
.RI ( dcheck
and
.I ncheck
only).
.PP
.I Icheck
examines each
.I filesystem,
builds a list of used blocks,
and compares this list against
the free list maintained on the file system.
The normal output of
.I icheck
includes a report of
.IP ""
The total number of files and the numbers of
regular, directory, block special and character special files.
.IP ""
The total number of blocks in use and the numbers of
single-, double-, and triple-indirect blocks and directory blocks.
.IP ""
The number of free blocks.
.IP ""
The number of blocks missing;
.I i.e.\&
not in any file
nor in the free list.
.PP
Other 
.I icheck
options are
.TP
.B -s
Ignore the free list and reconstruct a new one
by rewriting the super-block of the file system.
The file system should be dismounted while this is done;
if this is not possible (for example if
the root file system has to be salvaged)
care should be taken that the system is quiescent.
The words in the super-block
which indicate the size of the free list and of the
i-list are believed.
If the super-block has been curdled
these words will have to be patched.
The normal output reports are suppressed.
.TP
.BI -b " number ...
Report each appearance of the selected block
.I numbers
in a file or on the free list.
.TP
.B -d
Report each duplicate block.
.TP
.B -m
Report each missing block.
.TP
.B -e
Print at most one diagnostic per file;
useful for badly curdled file systems.
.PP
.I Dcheck
reads the directories in each
.I filesystem
and compares
the link count in each inode with the number of directory
entries by which it is referenced.
.PP
.I Ncheck
generates a list of pathname vs i-number for each named
.I filesystem.
Other
.I ncheck
options are
.TP
.B -a
Report
.L .
and
.LR .. ,
which are normally ignored.
.TP
.B -s
Report only special files, and files with
set-userid or set-groupid mode;
helpful in finding security breaches.
.SH "SEE ALSO"
.IR filsys (5),
.IR chuck (8),
.IR fsck (8),
.IR clri (8)
.SH DIAGNOSTICS
For duplicate blocks
and bad blocks (which lie outside the file system)
.I icheck
announces the difficulty, the i-number, and the kind of block involved.
If a read error is encountered,
the block number of the bad block is printed and
.I icheck
considers it to contain 0.
`Bad freeblock' means that
a block number outside the available space was encountered in the free list.
`Dups in free'
means that
blocks were found in the free list which
duplicate blocks either in some file or in the
earlier part of the free list.
.PP
When a file turns up for which the link-count and the number
of directory entries disagree,
.I dcheck
reports the relevant facts.
Allocated files which have 0 link-count and no entries are also
listed.
The only dangerous situation
occurs when there are more entries than links;
if entries are removed,
so the link-count drops to 0,
the remaining entries point to thin air.
They should be removed.
When there are more links than entries, or there is
an allocated file with neither links nor entries,
some disk space may be lost but the situation will not degenerate.
.PP
When the filesystem structure is improper,
.I ncheck
prints
.L ??
to denote the `parent' of
a parentless file.
A pathname beginning with
.L ...
denotes a loop.
.SH BUGS
Extraneous diagnostics
may be produced if these commands are applied to
active file systems.
.br
They believe even preposterous super-blocks and
consequently can get core images.
.br
.I Ncheck's
report is in no useful
order, and probably should be sorted.
.I Ncheck
fails to report the root inode.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.