PACKINGRULES(4) | File Formats | PACKINGRULES(4) |
The $HOME/.packingrules file is automatically created if users invoke filesync with filename arguments. By using filesync options, users can augment the packing rules in $HOME/.packingrules.
Many users choose to manually create the packing rules file and edit it by hand. Users can edit $HOME/.packingrules (using any editor) to permanently change the $HOME/.packingrules file, or to gain access to more powerful options that are not available from the command line (such as IGNORE commands). It is much easier to enter complex wildcard expressions by editing the $HOME/.packingrules file.
Blank lines and lines that begin with a pound sign (`#') are ignored.
Any line can be continued by placing a backslash (`\') immediately before the NEWLINE.
All other lines in the $HOME/.packingrules file have one of the following formats:
There are important differences between the arguments to LIST and IGNORE statements. The arguments to a LIST statement can contain slashes and are interpreted as file names relative to the BASE directories. The arguments to an IGNORE statement are simpler names or expressions that cannot contain slashes. An IGNORE statement will not override a LIST statement. IGNORE statements only exclude files that are found beneath LISTed directories.
If the first name argument to a LIST statement begins with an exclamation point (` !'), the remainder of the statement will be executed as a command. The command will be run in the current BASE directory. The output of the command will be treated as a list of newline separated file names to be packed/synchronized. The resulting file names will be interpreted relative to the enclosing BASE directory.
If the first name argument to an IGNORE statement begins with an exclamation point (` !'), the remainder of the statement will be executed as a command. The command will be run in the current BASE directory. The command will be expected to figure out which names should not be synchronized. The output of the command will be treated as a list of newline separated file names that should be excluded from the packing and synchronization list.
Commands will be broken into distinct arguments and run directly with sh -c. Blanks can be embedded in an argument by escaping them with a backslash (` \') or enclosing the argument in double quotes (` " '). Double quotes can be passed in arguments by escaping the double quotes with a backslash (` \').
LIST lines only apply to the BASE statement that precedes them. IGNORE lines can appear before any BASE statement (in which case they apply to all BASEs) or after a BASE statement (in which case they only apply to the BASE that precedes them). Any number of these statements can occur in any combination. The order is not important.
The use of these statements is illustrated in the following $HOME.packingrules file.
September 8, 2015 |