LNEXT
ONELCLEAN
UTERMINAL
TERMINAL
NEXT
$V1$
HILINE
PAUSE
IFILES
500 /CTI
9 /adm
837 /bin
337 /dict
345 /games
1026 /include
659 /lib
747 /local
3249 pub
309 ^m^Ua2??^Nn
17 spool
2 /sys
1144 tmp
GO
The command /etc/clri clears an i-node and is used primarily
to remove a file which does not appear in a directory listing,
or which has a name containing control characters, making it
difficult to specify a wild card string for removing it.
The syntax for the /etc/clri command is:
/etc/clri file system inode number ...
As you may recall, the procedure for obtaining the
inode-number is by using the /etc/ncheck command.
Let's try using the /etc/clri
command. First, get a listing
of the current directory by using
the ls -C command.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type ls -C
Please type ls -C
You will be helped this time!
$PROMPT$
FORGET1
ls -C
Please observe a typical result
above.
CTI bin games lib pub sys
adm dict include ^m^Ua2??^Nn spool tmp
It is clear that there is one file above whose name contains a
strange character string! You may try to rename it by finding a
wild-card string to pick up all the strange characters, or you may
decide to delete it by using /etc/clri; however, first you
need to find out the inode-number for it.
Please enter the command for
determining the inode numbers
of the files in the above directory
called dir1, so that you will
be able to delete the strange file
later with clri.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type
ncheck /dev/u | grep dir1
Please type
ncheck /dev/u | grep dir1
You will be helped this time!
$PROMPT$
FORGET2
ncheck /dev/u | grep dir1
Please observe the result above.
$PROMPT$
We can see above that the strange
file has an inode-number of 309,
so let us delete it by entering
the appropriate command at the
prompt!
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type /etc/clri /dev/u 309
Please type /etc/clri /dev/u 309
You will be helped this time!
$PROMPT$
FORGET3
/etc/clri /dev/u 309
This command will eliminate the
strange file!
$PROMPT$
Remember; however, clri does not update the superblock, so the
inode count will be unchanged even though the inode will be deleted.
You should run fsck afterwards to adjust this problem. Therefore,
it is easier to use the rm command rather than clri whenever possible!