add writability
[rrq/fusefile.git] / fusefile.8
1 .mso www.tmac
2 .TH fusefile 8
3 .SH NAME
4 fusefile \- FUSE file mount for combining file fragments read-only
5
6 .SH SYNOPSIS
7 .B fusefile \fR[fuse options\fR] \fBmountpoint\fR \fIfilename/from-to\fR ...
8
9 .SH DESCRIPTION
10
11 \fBfusefile\fR is FUSE file mount that presents a series of fragments of
12 other files as a contiguous concatenation. It bind mounts a driver on
13 top of the file mountpoint to present the nominated file fragments as
14 a single, contiguous file.
15
16 The fragment arguments include the filename of a source file, and
17 optionally start and end byte positions. All in all there five
18 variations:
19 .TP
20 \fIfilename\fR
21 include all of the file.
22 .TP
23 \fIfilename/\fR
24 include all of the file named with "/" in the pathname. This case
25 requires a final "/", since the last "/" separates the filename from
26 the position details.
27 .TP
28 \fIfilename/from\fR
29 include the file from the given start position, to end.
30 .TP
31 \fIfilename/-to\fR
32 include the file from beginning to the given end position (not
33 included).
34 .TP
35 \fIfilename/from-to\fR
36 include the file from the given start position, up to the given end
37 position (not included).
38 .TP
39 \fBpad=\fIfilename\fR
40
41 when this is given as first argument, the fused file is set up as a
42 writable random-access file, where the write events are captured
43 appended to the nominated "pad" file. The new content is inserted into
44 the fused file but not the original files, and fragments are split up
45 and adjusted as needed so as to make the write events appear as
46 insertions inteo the fused file.
47
48 .SH EXAMPLES
49
50 Insert file "y" into file "x" at position 1200:
51 .RS
52 \fB$ fusefile -ononempty x x/-1200 y x/1200\fR
53 .RE
54 The bind mount shadows the original file "x", and presents the
55 composite instead.
56
57 Make file y be a swap of the beginning and end of file "x", at position 2442:
58 .RS
59 \fB$ fusefile y x/2442 x/-2442\fR
60 .RE
61
62 .SH NOTES
63
64 Note that \fBfusefile\fR opens the nominated source file(s) before bind
65 mounting. With the fuse option \fI-ononempty\fR it will bind over an
66 non-empty file, which may be useful. The source file descriptors
67 remain open, but the source fragments are not recomputed. If a source
68 file changes or reduces in size, anything may happen.
69
70 If the mountpoint file doesn't exist, then \fBfusefile\fR creates it,
71 and removes it when unmounted.
72
73 When a "pad" file is used, it is updated as an "ar" archive where each
74 write event is a new member appended at the end. The "pad" member has
75 two additional, newline-terminated text lines with the insertion
76 position and the member size (ascii decimal digits), before the actual
77 insertion event content.
78
79 .SH AUTHOR
80
81 Ralph Rönnquist <ralph.ronnquist@gmail.com>