Print this page
6198 Let's EOL cachefs
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man4/packingrules.4
+++ new/usr/src/man/man4/packingrules.4
1 1 '\" te
2 2 .\" Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
3 +.\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
3 4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 -.TH PACKINGRULES 4 "Dec 23, 1996"
7 +.TH PACKINGRULES 4 "Sep 8, 2015"
7 8 .SH NAME
8 -packingrules \- packing rules file for cachefs and filesync
9 +packingrules \- packing rules file for filesync
9 10 .SH SYNOPSIS
10 11 .LP
11 12 .nf
12 13 \fB$\fR\fBHOME\fR\fB/.packingrules\fR
13 14 .fi
14 15
15 16 .SH DESCRIPTION
16 17 .sp
17 18 .LP
18 19 \fB$\fR\fBHOME\fR\fB/.packingrules\fR is a packing rules file for
19 -\fBfilesync\fR and \fBcachefspack\fR. \fB$\fR\fBHOME\fR\fB/.packingrules\fR
20 +\fBfilesync\fR. \fB$\fR\fBHOME\fR\fB/.packingrules\fR
20 21 contains a list of directories and files that are to be packed and
21 22 synchronized. It also contains a list of directories and files that are to be
22 -specifically excluded from packing and synchronization. See \fBfilesync\fR(1)
23 -and \fBcachefspack\fR(1M).
23 +specifically excluded from packing and synchronization. See \fBfilesync\fR(1).
24 24 .sp
25 25 .LP
26 26 The \fB$\fR\fBHOME\fR\fB/.packingrules\fR file is automatically created if
27 27 users invoke \fBfilesync\fR with filename arguments. By using \fBfilesync\fR
28 28 options, users can augment the packing rules in
29 29 \fB$\fR\fBHOME\fR\fB/.packingrules\fR.
30 30 .sp
31 31 .LP
32 32 Many users choose to manually create the packing rules file and edit it by
33 33 hand. Users can edit \fB$\fR\fBHOME\fR\fB/.packingrules\fR (using any editor)
34 34 to permanently change the \fB$\fR\fBHOME\fR\fB/.packingrules\fR file, or to
35 35 gain access to more powerful options that are not available from the command
36 36 line (such as \fBIGNORE\fR commands). It is much easier to enter complex
37 37 wildcard expressions by editing the \fB$\fR\fBHOME\fR\fB/.packingrules\fR file.
38 38 .sp
39 39 .LP
40 40 Blank lines and lines that begin with a pound sign (`\fB#\fR') are ignored.
41 41 .sp
42 42 .LP
43 43 Any line can be continued by placing a backslash (`\fB\e\fR\&') immediately
44 44 before the \fBNEWLINE.\fR
45 45 .sp
46 46 .LP
47 47 All other lines in the \fB$\fR\fBHOME\fR\fB/.packingrules\fR file have one of
48 48 the following formats:
49 49 .sp
50 50 .ne 2
51 51 .na
52 52 \fB\fBPACKINGRULES\fR\fR
53 53 .ad
54 54 .sp .6
55 55 .RS 4n
56 56 \fImajor\fR. \fIminor\fR. This line is not actually required, but it should be
57 57 the first line of every packing rules file. This line identifies the packing
58 58 rules file for the \fBfile\fR(1) command and specifies a format version
59 59 number. The current version number is 1.1. See \fBfile\fR(1).
60 60 .RE
61 61
62 62 .sp
63 63 .ne 2
64 64 .na
65 65 \fB\fBBASE\fR \fIdirectory-1\fR [\fIdirectory-2\fR]\fR
66 66 .ad
67 67 .sp .6
68 68 .RS 4n
69 69 This line identifies a directory (or pair of directories) under which files
70 70 should be packed and synchronized. At least one directory name must be
71 71 specified. For rules that are to be used by \fBfilesync\fR a second directory
72 72 name (where the copies are to be kept) must also be specified. The arguments
73 73 must be fully qualified path names, and may include environment variables.
74 74 .RE
75 75
76 76 .sp
77 77 .ne 2
78 78 .na
79 79 \fB\fBLIST\fR \fIname\fR \|.\|.\|.\fR
80 80 .ad
81 81 .sp .6
82 82 .RS 4n
83 83 This line enumerates a list of files and sub-directories (beneath the current
84 84 \fBBASE)\fR that are to be kept synchronized. This specification is recursive,
85 85 in that specifying the name of a directory automatically includes all files and
86 86 subdirectories it contains. Regular expressions (as described in \fBglob\fR
87 87 and \fBgmatch\fR) are permitted. See \fBglob\fR(1) and \fBgmatch\fR(3GEN).
88 88 .RE
89 89
90 90 .sp
91 91 .ne 2
92 92 .na
93 93 \fB\fBIGNORE\fR \fIname\fR \|.\|.\|.\fR
94 94 .ad
95 95 .sp .6
96 96 .RS 4n
97 97 This line enumerates a list of files that are not to be kept synchronized.
98 98 Regular expressions (using \fBglob\fR and \fBgmatch\fR) are permitted.
99 99 .RE
100 100
101 101 .sp
102 102 .LP
103 103 There are important differences between the arguments to \fBLIST\fR and
104 104 \fBIGNORE\fR statements. The arguments to a \fBLIST\fR statement can contain
105 105 slashes and are interpreted as file names relative to the \fBBASE\fR
106 106 directories. The arguments to an \fBIGNORE\fR statement are simpler names or
107 107 expressions that cannot contain slashes. An \fBIGNORE\fR statement will not
108 108 override a \fBLIST\fR statement. \fBIGNORE\fR statements only exclude files
109 109 that are found beneath \fBLISTed\fR directories.
110 110 .sp
111 111 .LP
112 112 If the first name argument to a \fBLIST\fR statement begins with an
113 113 exclamation point (`\fB!\fR'), the remainder of the statement will be executed
114 114 as a command. The command will be run in the current \fBBASE\fR directory. The
115 115 output of the command will be treated as a list of newline separated file
116 116 names to be packed/synchronized. The resulting file names will be interpreted
117 117 relative to the enclosing \fBBASE\fR directory.
118 118 .sp
119 119 .LP
120 120 If the first name argument to an \fBIGNORE\fR statement begins with an
121 121 exclamation point (`\fB!\fR'), the remainder of the statement will be executed
122 122 as a command. The command will be run in the current \fBBASE\fR directory. The
123 123 command will be expected to figure out which names should not be synchronized.
124 124 The output of the command will be treated as a list of newline separated file
125 125 names that should be excluded from the packing and synchronization list.
126 126 .sp
127 127 .LP
128 128 Commands will be broken into distinct arguments and run directly with \fBsh
129 129 \fR\fB-c\fR. Blanks can be embedded in an argument by escaping them with a
130 130 backslash (`\fB\e\fR\&') or enclosing the argument in double quotes (`
131 131 \fB"\fR '). Double quotes can be passed in arguments by escaping the double quotes with
132 132 a backslash (`\fB\e\fR\&').
133 133 .sp
134 134 .LP
135 135 \fBLIST\fR lines only apply to the \fBBASE\fR statement that precedes them.
136 136 \fBIGNORE\fR lines can appear before any \fBBASE\fR statement (in which case
137 137 they apply to all \fBBASEs)\fR or after a \fBBASE\fR statement (in which case
138 138 they only apply to the \fBBASE\fR that precedes them). Any number of these
139 139 statements can occur in any combination. The order is not important.
140 140 .SH EXAMPLES
141 141 .LP
142 142 \fBExample 1 \fRA sample \fB$\fR\fBHOME\fR\fB\&.packingrules\fR file.
143 143 .sp
144 144 .LP
145 145 The use of these statements is illustrated in the following
146 146 \fB$\fR\fBHOME\fR\fB\&.packingrules\fR file.
147 147
148 148 .sp
149 149 .in +2
150 150 .nf
151 151 #
152 152 # junk files, not worth copying
153 153 #
154 154 IGNORE core *.o *.bak *%
155 155 #
156 156 # most of the stuff I want to keep in sync is in my $HOME
157 157 #
158 158 BASE /net/bigserver/export/home/myname $HOME
159 159 # everything in my work sub-directory should be maintained
160 160 LIST work
161 161 # a few of my favorite mail boxes should be replicated
162 162 LIST m/incoming
163 163 LIST m/action
164 164 LIST m/pending
165 165 #
166 166 # I like to carry around a couple of project directories
167 167 # but skip all the postscript output
168 168 #
169 169 BASE /net/bigserver/export/projects $HOME/projects
170 170 LIST poindexter epiphany
171 171 IGNORE *.ps
172 172 #
173 173 # the foonly package should always be kept on every machine
174 174 #
175 175 BASE /net/bigserver/opt/foonly /opt/foonly
176 176 LIST !cat .packinglist
177 177 #
178 178 # and the latest executables for the standard build environment
↓ open down ↓ |
145 lines elided |
↑ open up ↑ |
179 179 #
180 180 BASE /net/bigserver/export/buildenv $HOME/buildenv
181 181 LIST !find . -type f -a -perm -111 -a -print
182 182 .fi
183 183 .in -2
184 184 .sp
185 185
186 186 .SH SEE ALSO
187 187 .sp
188 188 .LP
189 -\fBfile\fR(1), \fBfilesync\fR(1), \fBcachefspack\fR(1M)
189 +\fBfile\fR(1), \fBfilesync\fR(1)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX