clri
PURPOSE
Clears the specified i-node.
SYNOPSIS
clri [ flag ] filelsystem inumber
DESCRIPTION
Warning: Use this command only in emergencies and with
extreme care.
The clri command is used to clear i-node entries for
files that do not appear in a directory. In general, you
do not need to use this program because fsck can deal
with most file system inconsistencies.
Always run fsck on a file system after you have used clri
on it, because it may create dangling directory refer-
ences or missing blocks. These can be fixed if they are
attended to promptly. Do not run the system when the
file system has dangling directory references or a bad
free list.
The clri command zeroes over the flags word of the
i-node, thus freeing it for reallocation. The inumber
parameter specifies the i-node and filesystem specifies
the file system it is on. inumber should be a decimal
number, while filesystem can be either the name of the
device on which the file system resides or the name by
which it is normally mounted.
If you use clri to remove an i-node that does appear in a
directory, you should track down and remove all of these
entries. Otherwise, when the i-node is reallocated to
some new file, the old entry will still point to that
file. At that point removing the old entry destroys the
new file and the new entry again points to an unallocated
i-node.
By default, the clri command displays some information
about the file and asks for confirmation before it
destroys the file. If you enter a "y" or "yes", the file
is destroyed.
Since clri only zeroes the flags word of the i-node, if
you destroy the wrong file, you can recover the file by
using the fsdb command to restore the flags word.
Note: If the file is open, clri is likely to be ineffec-
tive. For this reason, you should run clri only on an
unmounted file system.
FLAGS
-f Destroys the file without confirmation, but writes
a description of the file.
-q Destroys the file without confirmation or writing a
description of the file.
EXAMPLE
To clear i-nodes "170" and "368" of the file system
/diskette0 and then clean up the file system:
clri /diskette0 170 368
fsck /diskette0
RELATED INFORMATION
The following commands: "fsck, dfsck" and "fsdb."
The fs file in AIX Operating System Technical Reference.