glenda.party
term% ls -F
term% cat index.txt
KFSCMD(8)                   System Manager's Manual                  KFSCMD(8)



NAME
       kfscmd, ksync - kfs administration

SYNOPSIS
       disk/kfscmd [-n name] cmd ...

       disk/ksync

DESCRIPTION
       Kfs  is  a  local  user-level  file server for a Plan 9 terminal with a
       disk.  Kfscmd transmits commands to the kfs server (see  kfs(4)).   The
       -n  option changes the name of the kfs service to kfs.name (by default,
       full name is just kfs).

       Ksync executes the sync command for all active kfs servers.

       The known commands are described below.  Note that  some  commands  are
       multiple  words  and should be quoted to appear as a single argument to
       rc(1).

       allow     Turn permission checking off (to simplify administration).

       allowoff

       disallow  Turn permission checking on.

       noauth    Disable authentication of users.

       halt      Write all changed blocks and stop the file system.

       start     The opposite of halt; restart the file system.

       help      Print the list of commands.

       rename file name
                 Change the name of file to name.  Name may be a  single  path
                 element  or  a full path; if it is a full path, every element
                 along the path must exist except the last.

       newuser user
                 Add user to /adm/users  and  make  the  standard  directories
                 needed for booting.

       remove file
                 Remove file and place its blocks on the free list.

       clri file Remove  file  but  do  not place the blocks on the free list.
                 This command can be used to remove files that have duplicated
                 blocks.   The non-duplicate blocks can be retrieved by check‐
                 ing the file system with option f (see below).

       create file owner group mode [adl]
                 Create the file.  Owner and group are users in /adm/users and
                 mode  is an octal number.  If present, creates an append only
                 file, creates a directory, and creates a file that is  exclu‐
                 sive-use.

       sync      Write to disk all of the dirty blocks in the memory cache.

       atime     Toggle  whether  atimes  are updated as files and directories
                 are accessed.  By default, atimes are updated.  On laptops it
                 can  be  useful  to turn off atime updates to reduce disk ac‐
                 cesses.

       stats     Report statistics about the performance of the file system.

       user      Re-initialize   authentication   information    by    reading
                 /adm/users.

       nowritegroup
                 Each  time kfs rereads /adm/users, it looks for a group named
                 write.  If such a group exists, then the entire  file  system
                 will  appear read-only to users not in the group.  If a write
                 group exists but no one is in it, it will  be  impossible  to
                 edit /adm/users to correct the problem.  To resolve this, the
                 nowritegroup command turns off write group checking until the
                 next time /adm/users is reread.

       cfs filsys
                 Change the `console' to the named file system (default is the
                 main system).

       chat      Toggle tracing of 9P messages.

       check [cdfpPqrtw]
                 Check the file system and print summary information.  The op‐
                 tions are
                 c      fix bad tags and clear the contents of the block.
                 d      delete  redundant  references  to a block, fix bad UTF
                        filenames.
                 f      rebuild the list of free blocks.
                 p      print the names of directories as they are checked.
                 P      print the names of all files as they are checked.
                 q      quiet mode: report errors, but suppress summary infor‐
                        mation
                 r      read all of the data blocks and check the tags.
                 t      fix bad tags.
                 w      write all of the blocks that are touched.

       listen [address]
                 Start  a  listener  to  serve the network at address, default
                 tcp!*!564.  This feature is intended to facilitate small net‐
                 works  of a couple machines in the situation when convenience
                 is more important than performance.   This  command  is  only
                 useful  on  machines  with  (possibly simulated) NVRAM, which
                 needs to be readable to the kfs processes; see  readnvram  in
                 authsrv(2).   The  production  file  server  (see  fs(4))  is
                 strongly encouraged for anything more than casual use.

       noneattach
                 When listening to the network, the default behavior  is  that
                 the  user none may only attach over connections that have al‐
                 ready authenticated as someone else.  This prevents just any‐
                 one  from  being able to dial your server and attach as none.
                 The noneattach command toggles whether none can attach  with‐
                 out such a chaperone.

SOURCE
       /sys/src/cmd/disk/kfscmd.c
       /$objtype/bin/disk/ksync

SEE ALSO
       kfs(4), mkfs(8), prep(8), sd(3)



                                                                     KFSCMD(8)