-
Notifications
You must be signed in to change notification settings - Fork 5
/
ghostlinkd.1
150 lines (142 loc) · 4.22 KB
/
ghostlinkd.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
." Text automatically generated by txt2man-1.4.7
.TH ghostlinkd 1 "October 02, 2015" "" ""
.SH NAME
\fBghostlinkd \fP- Monitor and maintain an aggregate symlink directory.
\fB
.SH SYNOPSIS
.nf
.fam C
\fBghostlinkd\fP [\fIOPTIONS\fP]
.fam T
.fi
.SH DESCRIPTION
\fBghostlinkd\fP will first scan, and then continuously monitor a list of
source directories, in order to keep a target directory updated with
the aggregated content of the source directories, in priority order.
This is accomplished using one of the supported methods: symlinking,
.TP
.B
hardlinking, or rsyncing.
By default it goes to the background as a
daemon, but it can be made to run in the foreground.
.PP
In order to do its work it uses the inotify interface of Linux kernel
2.6.13 and later. It will not work if the inotify interface is absent.
.PP
Example: Let's say that you have the source directory list:
["/foo/a/", "/bar/b/", "/baz/c/"]; and a target directory "/fum/t/".
If the contents of the source directories are:
.PP
.nf
.fam C
/foo/a/
xx
xy
xz
/bar/b/
xx
yy
zz
/baz/c/
xy
yy
yz
.fam T
.fi
then the target directory will be made to contain the following:
.PP
.nf
.fam C
/fum/t/
xx -> /foo/a/xx
xy -> /foo/a/xy
xz -> /foo/a/xz
yy -> /bar/b/yy
yz -> /baz/c/yz
zz -> /bar/b/zz
.fam T
.fi
Note that xx, which occurs in both /foo/a/ and /bar/b/, is linked to
/foo/a/ because that occurs before /bar/b/ in the source list; and in
the same manner, yy is linked to /bar/b/yy rather than /baz/c/yy
because /bar/b/ occurs before /baz/c/ in the source list.
.SH OPTIONS
.TP
.B
\fB-b\fP, \fB--batch\fP
Only run initial scan and update. Implies \fB-f\fP
.TP
.B
\fB-d\fP, \fB--debug\fP
Run with debug output
.TP
.B
\fB-f\fP, \fB--foreground\fP
Run in the foreground, don't daemonize
.TP
.B
\fB-i\fP, \fB--ignore-hidden\fP
Ignore file names starting with '.'
.TP
.B
\fB-n\fP, \fB--dry-run\fP
Don't do anything, just show what would be done
.TP
.B
\fB-r\fP, \fB--report\fP
Show existing links
.TP
.B
\fB-h\fP, \fB--help\fP
Output this help, then exit
.TP
.B
\fB-v\fP, \fB--verbose\fP
Be more verbose
.TP
.B
\fB-V\fP, \fB--version\fP
Output version, then exit
.SH FILES
\fBghostlinkd\fP reads its configuration from the following files (if
found), in the given order:
.PP
.nf
.fam C
<bin-dir>/ghostlinkd.conf
/etc/ghostlinkd.conf
/etc/ghostlinkd/ghostlinkd.conf
~/.ghostlinkdrc
.fam T
.fi
where <bin-dir> is the directory where \fBghostlinkd\fP is installed.
.SH AUTHOR
Written by Henrik Levkowetz, <[email protected]>. Uses the
daemonize module from Chad J. Schroeder, from the Python Cookbook at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731.
.RE
.PP
.SH COPYRIGHT
Copyright 2011, 2015 Henrik Levkowetz. All rights reserved.
.PP
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
.IP \(bu 3
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.IP \(bu 3
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
.SS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.