1
0

kfscmd 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. .TH KFSCMD 8
  2. .SH NAME
  3. kfscmd, ksync \- kfs administration
  4. .SH SYNOPSIS
  5. .B disk/kfscmd
  6. .RB [ -n
  7. .IR name ]
  8. cmd ...
  9. .PP
  10. .B disk/ksync
  11. .SH DESCRIPTION
  12. .I Kfs
  13. is a local user-level file server for a Plan 9 terminal with a disk.
  14. .I Kfscmd
  15. transmits commands to the
  16. .I kfs
  17. server (see
  18. .IR kfs (4)).
  19. The
  20. .B -n
  21. option changes the name of the kfs service to
  22. .BI kfs. name
  23. (by default, full name is just
  24. .BR kfs ).
  25. .PP
  26. .I Ksync
  27. executes the
  28. .B sync
  29. command for all active
  30. .I kfs
  31. servers.
  32. .PP
  33. The known commands are described below.
  34. Note that some commands are multiple words and
  35. should be quoted to appear as a single argument to
  36. .IR rc (1).
  37. .TP \w'\fLallowoff\ \fIn'u
  38. .B allow
  39. Turn permission checking off (to simplify administration).
  40. .TP
  41. .B allowoff
  42. .TP
  43. .B disallow
  44. Turn permission checking on.
  45. .TP
  46. .B noauth
  47. Disable authentication of users.
  48. .TP
  49. .B halt
  50. Write all changed blocks and stop the file system.
  51. .TP
  52. .B start
  53. The opposite of halt; restart the file system.
  54. .TP
  55. .B help
  56. Print the list of commands.
  57. .TP
  58. .BI "rename " "file name"
  59. Change the name of
  60. .I file
  61. to
  62. .IR name .
  63. .I Name
  64. may be a single path element or a full path; if it is a full path,
  65. every element along the path must exist except the last.
  66. .TP
  67. .BI "newuser " user
  68. Add
  69. .I user
  70. to
  71. .B /adm/users
  72. and make the standard directories needed for booting.
  73. .TP
  74. .BI "remove " file
  75. Remove
  76. .I file
  77. and place its blocks on the free list.
  78. .TP
  79. .BI "clri " file
  80. Remove
  81. .I file
  82. but do not place the blocks on the free list.
  83. This command can be used to remove files that have duplicated blocks.
  84. The non-duplicate blocks can be retrieved by checking the file system
  85. with option
  86. .B f
  87. (see below).
  88. .TP
  89. .BI create \ file\ owner\ group\ mode\ [adl]
  90. Create the file. Owner and group are users in
  91. .B /adm/users
  92. and mode is an octal number.
  93. If present,
  94. .L a
  95. creates an append only file,
  96. .L d
  97. creates a directory, and
  98. .L l
  99. creates a file that is exclusive-use.
  100. .TP
  101. .B sync
  102. Write to disk all of the dirty blocks in the memory cache.
  103. .TP
  104. .B atime
  105. Toggle whether atimes are updated as files and directories
  106. are accessed. By default, atimes are updated. On laptops it can be
  107. useful to turn off atime updates to reduce disk accesses.
  108. .TP
  109. .B stats
  110. Report statistics about the performance of the file system.
  111. .TP
  112. .B user
  113. Re-initialize authentication information by reading
  114. .BR /adm/users .
  115. .TP
  116. .B nowritegroup
  117. Each time
  118. .I kfs
  119. rereads
  120. .BR /adm/users ,
  121. it looks for a group named
  122. .BR write .
  123. If such a group exists, then the entire file system
  124. will appear read-only to users not in the group.
  125. If a write group exists but no one is in it,
  126. it will be impossible to edit
  127. .B /adm/users
  128. to correct the problem.
  129. To resolve this, the
  130. .B nowritegroup
  131. command turns off write group checking until the next
  132. time
  133. .B /adm/users
  134. is reread.
  135. .TP
  136. .BI cfs " filsys
  137. Change the `console' to the named file system (default is the main system).
  138. .TP
  139. .B chat
  140. Toggle tracing of 9P messages.
  141. .TP
  142. .B check [cdfpPqrtw]
  143. Check the file system and print summary information.
  144. The options are
  145. .PD 0
  146. .RS
  147. .TP
  148. .B c
  149. fix bad tags and clear the contents of the block.
  150. .TP
  151. .B d
  152. delete redundant references to a block, fix bad UTF filenames.
  153. .TP
  154. .B f
  155. rebuild the list of free blocks.
  156. .TP
  157. .B p
  158. print the names of directories as they are checked.
  159. .TP
  160. .B P
  161. print the names of all files as they are checked.
  162. .TP
  163. .B q
  164. quiet mode: report errors, but suppress summary information
  165. .TP
  166. .B r
  167. read all of the data blocks and check the tags.
  168. .TP
  169. .B t
  170. fix bad tags.
  171. .TP
  172. .B w
  173. write all of the blocks that are touched.
  174. .RE
  175. .PD
  176. .TP
  177. .BI listen " [address]
  178. Start a listener to serve the network at
  179. .IR address ,
  180. default
  181. .BR il!*!17008 .
  182. This feature is intended to facilitate small networks of a couple
  183. machines in the situation when convenience is more
  184. important than performance.
  185. This command is only useful on machines with
  186. (possibly simulated) NVRAM, which needs to be readable
  187. to the
  188. .I kfs
  189. processes;
  190. see
  191. .I readnvram
  192. in
  193. .IR authsrv (2).
  194. The production file server
  195. (see
  196. .IR fs (4))
  197. is strongly encouraged for anything more than casual use.
  198. .TP
  199. .B noneattach
  200. When listening to the network, the default behavior is that the user
  201. .B none
  202. may only attach over connections that have already
  203. authenticated as someone else.
  204. This prevents just anyone from being
  205. able to dial your server and attach as
  206. .BR none .
  207. The
  208. .B noneattach
  209. command toggles whether
  210. .B none
  211. can attach without such a chaperone.
  212. .PD
  213. .SH SOURCE
  214. .B /sys/src/cmd/disk/kfscmd.c
  215. .br
  216. .B /$objtype/bin/disk/ksync
  217. .SH "SEE ALSO"
  218. .IR kfs (4),
  219. .IR mkfs (8),
  220. .IR prep (8),
  221. .IR sd (3)