1packingrules(4)                  File Formats                  packingrules(4)
2
3
4

NAME

6       packingrules - packing rules file for cachefs and filesync
7

SYNOPSIS

9       $HOME/.packingrules
10
11

DESCRIPTION

13       $HOME/.packingrules  is a packing rules file for filesync and  cachefs‐
14       pack. $HOME/.packingrules contains a list of directories and files that
15       are to be packed and synchronized.  It also contains a list of directo‐
16       ries and files that  are to be specifically excluded from  packing  and
17       synchronization. See  filesync(1) and  cachefspack(1M).
18
19
20       The  $HOME/.packingrules  file is automatically created if users invoke
21       filesync with filename arguments. By using filesync options, users  can
22       augment the packing rules in $HOME/.packingrules.
23
24
25       Many users choose to manually create the packing rules file and edit it
26       by hand. Users can edit $HOME/.packingrules (using any editor) to  per‐
27       manently change the $HOME/.packingrules file, or to gain access to more
28       powerful options that are not available from the command line (such  as
29       IGNORE  commands).  It is much easier to enter complex wildcard expres‐
30       sions by editing the $HOME/.packingrules file.
31
32
33       Blank lines and lines that begin with a pound sign  (`#') are ignored.
34
35
36       Any line can be continued by placing  a  backslash   (`\')  immediately
37       before the  NEWLINE.
38
39
40       All  other  lines in the  $HOME/.packingrules file have one of the fol‐
41       lowing formats:
42
43       PACKINGRULES
44
45           major. minor. This line is not actually required, but it should  be
46           the  first   line of every packing rules file. This line identifies
47           the packing rules file for the  file(1)  command  and  specifies  a
48           format  version  number.  The  current  version  number is 1.1. See
49           file(1).
50
51
52       BASE directory-1 [directory-2]
53
54           This line identifies a directory (or  pair  of  directories)  under
55           which  files should be packed and synchronized. At least one direc‐
56           tory name must be specified. For rules  that  are  to  be  used  by
57           filesync  a second directory name (where the copies are to be kept)
58           must also be specified. The arguments must be fully qualified  path
59           names, and may include environment variables.
60
61
62       LIST name ...
63
64           This  line enumerates a list of files and sub-directories  (beneath
65           the current BASE) that are to be kept  synchronized. This  specifi‐
66           cation  is  recursive,  in  that specifying the name of a directory
67           automatically includes all files and  subdirectories  it  contains.
68           Regular expressions  (as described in glob  and gmatch) are permit‐
69           ted. See glob(1) and  gmatch(3GEN).
70
71
72       IGNORE name ...
73
74           This line enumerates a list of files that are not to be  kept  syn‐
75           chronized.  Regular  expressions  (using glob  and gmatch) are per‐
76           mitted.
77
78
79
80       There are important differences  between  the  arguments  to  LIST  and
81       IGNORE  statements.  The  arguments  to  a  LIST  statement can contain
82       slashes and are interpreted as file names relative to the  BASE  direc‐
83       tories.  The  arguments  to  an  IGNORE  statement are simpler names or
84       expressions that cannot contain slashes. An IGNORE statement  will  not
85       override  a  LIST  statement. IGNORE statements only exclude files that
86       are found beneath LISTed directories.
87
88
89       If the first name argument to a  LIST statement begins with an exclama‐
90       tion point  (`!'), the remainder of the statement will be executed as a
91       command. The command will be run in the  current  BASE  directory.  The
92       output  of  the command will be treated as a  list of newline separated
93       file names to be packed/synchronized. The resulting file names will  be
94       interpreted relative to the enclosing  BASE directory.
95
96
97       If  the  first  name  argument  to  an  IGNORE statement begins with an
98       exclamation point  (`!'), the remainder of the statement will  be  exe‐
99       cuted  as a command. The command will be run in the current BASE direc‐
100       tory. The command will be expected to figure out which names should not
101       be synchronized. The output of the command will be treated as a list of
102       newline separated file names that should be excluded from  the  packing
103       and synchronization list.
104
105
106       Commands  will  be broken into distinct arguments and run directly with
107       sh -c. Blanks can be embedded in an argument by escaping  them  with  a
108       backslash  (`\')  or  enclosing the argument in  double quotes (` " ').
109       Double quotes can be passed in arguments by escaping the double  quotes
110       with a backslash (`\').
111
112
113       LIST lines only apply to the  BASE statement that precedes them. IGNORE
114       lines can appear before any  BASE statement (in which case  they  apply
115       to  all  BASEs)  or  after  a  BASE statement (in which case  they only
116       apply to the  BASE that precedes them). Any number of  these statements
117       can occur in any combination. The order is not important.
118

EXAMPLES

120       Example 1 A sample $HOME.packingrules file.
121
122
123       The use of these statements is illustrated in the following $HOME.pack‐
124       ingrules file.
125
126
127         #
128         # junk files, not worth copying
129         #
130         IGNORE core *.o *.bak *%
131         #
132         # most of the stuff I want to keep in sync is in my $HOME
133         #
134         BASE /net/bigserver/export/home/myname $HOME
135         # everything in my work sub-directory should be maintained
136         LIST work
137         # a few of my favorite mail boxes should be replicated
138         LIST m/incoming
139         LIST m/action
140         LIST m/pending
141         #
142         # I like to carry around a couple of project directories
143         # but skip all the postscript output
144         #
145         BASE /net/bigserver/export/projects $HOME/projects
146         LIST poindexter epiphany
147         IGNORE *.ps
148         #
149         # the foonly package should always be kept on every machine
150         #
151         BASE /net/bigserver/opt/foonly /opt/foonly
152         LIST !cat .packinglist
153         #
154         # and the latest executables for the standard build environment
155         #
156         BASE /net/bigserver/export/buildenv $HOME/buildenv
157         LIST !find . -type f -a -perm -111 -a -print
158
159
160

SEE ALSO

162       file(1), filesync(1), cachefspack(1M)
163
164
165
166SunOS 5.11                        23 Dec 1996                  packingrules(4)
Impressum