System Administration Guide, Volume I

Packing Lists

One of the features of the cachefspack command is the ability to pack packing lists. This saves the time of having to specify each individual file that you want packed in the cache.

A packing list contains files or directories to be packed in the cache. If a directory is in the packing list, all of its subdirectories and files will also be packed.

How to Create a Packing List

To create a packing list, open a file by using vi or the editor of your choice. The packing list file format uses the same format as the filesync command. See filesync(1) for more information.

Example--Creating a Packing List

The following example shows the contents of a packing list file.


BASE /home/ignatz
LIST plans
LIST docs
IGNORE *.ps

How to Pack Files in the Cache as Specified in a Packing List

To pack files using the packing list, use the cachefspack -f command, as follows:


$ cachefspack -f packing-list

This means you want the software to read the packing list and pack files based on the information specified in the packing list.

-f

Specifies that you want to use a packing list. 

packing-list

Specifies the name of the packing list. 

Example--Packing Files in the Cache as Specified in a Packing List

This examples uses the list.pkg file as the packing list for the cachefspack command.


$ cachefspack -f list.pkg

How to Specify Files in the Packing List to be Treated as Regular Expressions

To specify that one or more files in the packing list should be treated as regular expressions (not as literal file names), use the -r option with the -f option of the cachefspack command. The -r option cannot be used alone.


$ cachefspack -rf packing_list

where packing_list contains a LIST command defined as follows:


LIST *.doc

-r

Specifies that you want the file or files defined in the LIST command treated as regular expressions, and not as literal file names.

-f

Specifies that you want the packing list packed in the cache. 

packing_list

Indicates the name of the packing list that contains the LIST command with the file or files you want treated as regular expressions.

Example--Specifying Files in the Packing List to be Treated as Regular Expressions

The following example shows the packing list list.pkg specified to be packed in the cache. list.pkg contains a LIST command that defines a regular expression.


$ cachefspack -rf list.pkg

The software will pack the file list.pkg into the cache and treat the file names defined in the LIST command as regular expressions, and not as literal file names.

How to Pack Files From a Shared Directory

  1. To pack files from a shared directory, and to ensure that you pack only those files that you own, define the LIST command within the packing list file as follows:


    LIST !find . -user your_user_name -print
  2. Pack the packing list in the cache using the cachefspack -sf command.


    $ cachefspack -sf packing_list
    

    -s

    Adjusts the output of the find command to be suitable for the packing list. 

    -f

    Specifies a packing list to read. 

    filename

    Specifies the name of the packing list to read. 


    Note -

    The -s option must be used with the -f option. The -s option cannot be used alone.


Example--Packing Files From a Shared Directory

The following example shows how to define a LIST command in the packing list to pack only the files from the base directory that you own:


LIST !find . -user jones -print

The following example shows how you would then specify packing the packing list.


$ cachefspack -sf /projects/proj_1