ffsscckk -- Command

Check and repair file systems interactively
/eettcc/ffsscckk [ -ffnnqqssSSyy ] [ -tt _t_e_m_p_f_i_l_e ] [ _f_i_l_e_s_y_s_t_e_m ... ]

ffsscckk checks  and interactively repairs file systems.  If  all is well, ffsscckk
merely prints the number of files  used, the number of blocks used, and the
number  of  blocks that  are  free.  If  the  file system  is  found to  be
inconsistent in  one of  the aspects outlined  below, ffsscckk asks  whether it
should fix the inconsistency and waits for you to reply yyeess or nnoo.

The following file system aspects are checked for consistency by ffsscckk:

-> If a block is claimed by more than one i-node, by an i-node and the free
   list, or more than once in the free list.

-> Whether  an  i-node or  the  free  list claims  blocks  beyond the  file
   system's range.

-> Link counts that are incorrect.

-> Whether the directory size is not aligned for 16 bytes.

-> Whether the i-node format is correct.

-> Whether any blocks are not accounted for.

-> Whether a file points to an unallocated i-node.

-> Whether a file's i-node number is out of range.

-> Whether the super block refers to more than 65,536 i-nodes.

-> Whether the  super block  assigned more blocks  to the i-nodes  than the
   system contains.

-> Whether the format of the free block list is correct.

-> Whether the  counts of the  total free blocks  and the free  i-nodes are
   correct.

ffsscckk prints  a warning message  when a file  name is null,  has an embedded
slash `/',  is not  null-padded, or if  `.' or `..'  files do not  have the
correct i-node numbers.

When  ffsscckk repairs  a file  system,  any file  that is  orphaned (that  is,
allocated but  not referenced) is  deleted if it  is empty, or  copied to a
directory  called lloosstt+ffoouunndd,  with  its i-node  number as  its name.   The
directory  lloosstt+ffoouunndd must  exist  in the  root  of the  file system  being
checked before  ffsscckk is  executed, and  it must have  room for  new entries
without requiring that new blocks be allocated.

ffsscckk recognizes the following options:

-ff Fast check.  ffsscckk  only checks whether a block has  been claimed by more
   than one  i-node, by an i-node  and the free list, or  more than once in
   the free list.  If necessary, ffsscckk will reconstruct the free list.

-nn No option: a default reply of nnoo is given to all of ffsscckk's questions.

-qq Quiet option: run  quietly.  ffsscckk automatically removes all unreferenced
   pipes, and  automatically fixes list  counts in the super  block and the
   free list.   File-name warning messages  are suppressed, but  ffsscckk still
   prints the  number of  files used,  the number of  blocks used,  and the
   number of blocks that remain free.

-ss Sort the  free lists, both  free blocks and  free i-nodes, based  on the
   interleave number.   This is useful in reducing  fragmentation of a file
   system.  This option ignores mounted file systems.

-SS Same as  -ss, except  that it  also works on  mounted file  systems.  Not
   recommended for the faint of heart.

-tt Name the temporary file used by ffsscckk.

-yy Yes option: a default reply of yyeess is given to all of ffsscckk's questions.

If you  do not name a  file system in ffsscckk's command  line, ffsscckk checks the
file systems named in the file /eettcc/cchheecckklliisstt.

_F_i_l_e_s
/eettcc/cchheecckklliisstt

_S_e_e _A_l_s_o
ccllrrii, ccoommmmaannddss, iicchheecckk, nncchheecckk, rraamm, ssyynncc, uummoouunntt

_N_o_t_e_s
The correction  of file systems  almost always involves  the destruction of
data.

You should run ffsscckk only when the COHERENT system is in single-user mode.

ffsscckk cannot modify a file system during its work.  This rule was adopted to
prevent ffsscckk from attempting to modify a corrupt file system, and so making
matters worse.   However, this  means that ffsscckk  cannot change the  size of
directory lloosstt+ffoouunndd. Thus, if more files are detached from the file system
than  lloosstt+ffoouunndd can  hold, ffsscckk  must  delete them  outright.  If  you are
running an application that uses  large numbers of transient files (e.g., a
news system), you  should increase the size of lloosstt+ffoouunndd  so that it has a
fighting chance of  holding all detached files that ffsscckk  finds.  To do so,
use  the  command /eettcc/mmkklloosstt+ffoouunndd.  For  details, see  its  entry in  the
Lexicon.
