HJFS(8)                                                   HJFS(8)

     NAME
          hjfs - file server maintenance

     SYNOPSIS
          allow
          chatty
          create path uid gid perm [lad]
          df
          disallow
          dump
          echo [on|off]
          halt
          newuser name [options]
          users
          sync
          debug-chdeind file [offset value]
          debug-deind file
          debug-getblk file [blk|start end]

     DESCRIPTION
          The following commands should be written to the console of
          an hjfs(4) file server.

          Allow disables permission checking and allows changing file
          ownership (see chgrp(1)). This may help in initializing a
          file system.  Use this with caution.

          Chatty enables chatty 9p.

          Create creates a file on the current file system.  Uid and
          gid are names or numbers from /adm/users.  Perm is the low 9
          bits of the permission mode of the file, in octal.  An
          optional final l, a, or d creates a locked file, append-only
          file, or directory.

          Df prints the number of free, used and total
          blocks/megabytes.  It scans the block table and can be slow
          on large hard disks.

          Disallow restores permission checking back to normal after a
          file system has been initialized.

          Dump immediately starts a dump.

          Echo expects the argument on or off. On causes all executed
          commands to be printed on the system console.  Off reverses
          the effects of on.

          Halt exits the program.

     Page 1                       Plan 9            (printed 11/22/24)

     HJFS(8)                                                   HJFS(8)

          Newuser requires a name argument.  With no options it adds
          user name, with group leader name, to /adm/users and makes
          the directory /usr/name owned by user and group name. The
          options are

          :          Add a group: add the name to /adm/users but don't
                     create the directory.  By convention, groups are
                     numbered starting from 10000, users from 0.
          newname    Rename existing user name to newname.
          =leader    Change the leader of name to leader. If leader is
                     missing, remove the existing leader.
          +member    Add member to the member list of name.
          -member    Remove existing member from the member list of
                     name.

          After a successful newuser command the file server over-
          writes /adm/users to reflect the internal state of the user
          table.

          Users reads the contents of file /adm/users to initialize
          the file server's internal representation of the users
          structure.

          Sync writes dirty blocks in memory to the magnetic disk
          cache.

          Note: Debug commands operate on internal data structures;
          they are inherently dangerous and can cause file system dam-
          age.

          Debug-chdeind changes the value of the byte at the specified
          offset in the in-memory directory entry and prints the old
          value. Dangerous if used carelessly.

          Debug-deind requires a file argument. It prints the direc-
          tory entry of file.

          Debug-getblk prints the physical blocks of file correspond-
          ing to the logical block blk or the logical blocks between
          start and end.

     EXAMPLES
          Check disk usage (output appears on the system console).

               % echo df >>/srv/hjfs.cmd

     SEE ALSO
          hjfs(4)

     SOURCE
          /sys/src/cmd/hjfs

     Page 2                       Plan 9            (printed 11/22/24)

     HJFS(8)                                                   HJFS(8)

     BUGS
          Debug-chdeind should perhaps be less crazy and have a port-
          able interface.

     Page 3                       Plan 9            (printed 11/22/24)