ramfs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. .TH RAMFS 4
  2. .SH NAME
  3. ramfs \- memory file system
  4. .SH SYNOPSIS
  5. .B ramfs
  6. [
  7. .B -Dipsu
  8. ]
  9. [
  10. .B -m
  11. .I mountpoint
  12. ]
  13. [
  14. .B -S
  15. .I srvname
  16. ]
  17. .SH DESCRIPTION
  18. .I Ramfs
  19. starts a process that mounts itself (see
  20. .IR bind (2))
  21. on
  22. .I mountpoint
  23. (default
  24. .BR /tmp ).
  25. The
  26. .I ramfs
  27. process implements a file tree rooted at
  28. .IR dir ,
  29. keeping all files in memory.
  30. Initially the file tree is empty.
  31. .PP
  32. The
  33. .B -D
  34. option enables a trace of general debugging messages.
  35. .PP
  36. The
  37. .B -i
  38. flag tells
  39. .I ramfs
  40. to use file descriptors 0 and 1 for its communication channel
  41. rather than create a pipe.
  42. This makes it possible to use
  43. .I ramfs
  44. as a file server on a remote machine: the file descriptors 0
  45. and 1 will be the network channel from
  46. .I ramfs
  47. to the client machine.
  48. .PP
  49. The
  50. .B -p
  51. flag causes
  52. .I ramfs
  53. to make its memory `private'
  54. (see
  55. .IR proc (3))
  56. so that its files are not accessible through the debugging interface.
  57. .PP
  58. The
  59. .B -s
  60. .RB ( -S )
  61. flag causes
  62. .I ramfs
  63. to post its channel on
  64. .B /srv/ramfs
  65. .RB ( /srv/ \fIsrvname\fR)
  66. rather than mounting it on
  67. .IR mountpoint ,
  68. enabling multiple clients to access its files.
  69. However, it does not authenticate its clients and its
  70. implementation of groups is simplistic, so
  71. it should not be used for precious data.
  72. .PP
  73. The
  74. .B -u
  75. option permits
  76. .I ramfs
  77. to consume as much memory as needed;
  78. without it,
  79. .I ramfs
  80. will limit its consumption to some arbitrary amount,
  81. currently 768MB (enough to hold a CD image).
  82. .PP
  83. This program is useful mainly as an example of how
  84. to write a user-level file server.
  85. It can also be used to provide high-performance temporary files.
  86. .SH SOURCE
  87. .B /sys/src/cmd/ramfs.c
  88. .SH "SEE ALSO"
  89. .IR bind (2)