editorial
[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
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
12 of other files as a contiguous concatenation. It bind mounts a driver
13 on top of the file mountpoint to present the nominated file fragments
14 as a single, contiguous file. It accepts over-writing on the fused
15 file which gets distributed accordingly to the fragments, but cannot
16 change size.
17
18 The fragment arguments include the filename of a source file, and
19 optionally start and end byte positions. All in all there five
20 variations:
21
22 .TP
23 \fIfilename\fR or \fIfilename/\fR
24 include all of the file. A pathname that includes "/" must be ended
25 with an extra "/" since that last "/" separates the filename from the
26 range detail.
27
28 .TP
29 \fIfilename/start:end\fR
30 include the range from the given start to end. Either "start" or "end"
31 or both may be omitted, to mean the beginning and end of the file
32 respectively. If "start" or "end" are less than 0 then it means
33 relative to the end of the file.
34
35 .TP
36 \fIfilename/start+length\fR
37 include "length" bytes from the given start. A negative "start" means
38 relative to the end of the file. If "length" is negative or omitted it
39 means that position relative to the end.
40
41 .TP
42 \fIfilename/start\fR
43 include bytes from the given start. This is the same as "/start+"
44
45 .P
46 Note that a negative start position is clipped to 0 and a too large
47 end position  is clipped to the end of the file.
48
49 .P
50 Charater devices are treated as being of any given finite size, but
51 have size 0 by default. For example, "/dev/zero/:100" means a fragment
52 of 100 NUL bytes.
53
54 .SH EXAMPLES
55
56 Insert file "y" into file "x" at position 1200:
57 .RS
58 \fB$ fusefile -ononempty x x/:1200 y x/1200:\fR
59 .RE
60 The bind mount shadows the original file "x", and presents the
61 fused file instead.
62
63 Make fused file y be a swap of the beginning and end of file "x", at
64 position 2442:
65 .RS
66 \fB$ fusefile y x/2442: x/:2442\fR
67 .RE
68
69 .SH NOTES
70
71 Note that \fBfusefile\fR opens the nominated source file or files
72 before bind mounting. With the fuse option \fI-ononempty\fR it will
73 bind over an non-empty file, which may be useful. The source file
74 descriptors remain open, but the source fragments are not recomputed.
75 If a source file changes the fused file will present the new content.
76 If a source is reduced in size, access will be inconsistent.
77
78 If the mountpoint file doesn't exist, then \fBfusefile\fR creates it,
79 and removes it when unmounted.
80
81
82 .SH AUTHOR
83
84 Ralph Rönnquist <ralph.ronnquist@gmail.com>