1 '\" te
   2 .\"  Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
   3 .\" 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 .\" 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 .\" 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 CACHEFSPACK 1M "Mar 18, 2004"
   7 .SH NAME
   8 cachefspack \- pack files and file systems in the cache
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 \fBcachefspack\fR [\fB-h\fR] [\fB-i\fR | \fB-p\fR | \fB-u\fR] [\fB-f\fR \fIpacking-list\fR]
  13      [\fB-U\fR \fIcache-directory\fR] [\fIfile\fR]...
  14 .fi
  15 
  16 .SH DESCRIPTION
  17 .sp
  18 .LP
  19 The \fBcachefspack\fR utility is used to set up and maintain files in the
  20 cache. This utility affords greater control over the cache, ensuring that the
  21 specified files are in the cache whenever possible.
  22 .sp
  23 .LP
  24 \fBcachefspack\fR does not pack files when the backfileystem type for the
  25 \fBcachefs\fR mount is NFSv4. This is because only pass-through support is
  26 available for \fBcachefs\fR with NFSv4.
  27 .SH OPTIONS
  28 .sp
  29 .LP
  30 The following options are supported:
  31 .sp
  32 .ne 2
  33 .na
  34 \fB\fB\fR\fB-f\fR\fB \fR\fIpacking-list\fR\fR
  35 .ad
  36 .RS 22n
  37 Specify a file containing a list of files and directories to be packed. Options
  38 within subdirectories and files can also be specified. The format and rules
  39 governing \fIpacking-list\fR are described on the \fBpackingrules\fR(4) manual
  40 page. Directories are packed recursively. Symlinks that match a regular
  41 expression on a \fBLIST\fR command are followed. Symlinks encountered while
  42 recursively processing directories are not followed.
  43 .RE
  44 
  45 .sp
  46 .ne 2
  47 .na
  48 \fB\fB-h\fR\fR
  49 .ad
  50 .RS 22n
  51 Help. Print a brief summary of all the options.
  52 .RE
  53 
  54 .sp
  55 .ne 2
  56 .na
  57 \fB\fB-i\fR\fR
  58 .ad
  59 .RS 22n
  60 View information about the packed files.
  61 .RE
  62 
  63 .sp
  64 .ne 2
  65 .na
  66 \fB\fB-p\fR\fR
  67 .ad
  68 .RS 22n
  69 Pack the file or files specified by \fBfile\fR. This is the default behavior.
  70 .RE
  71 
  72 .sp
  73 .ne 2
  74 .na
  75 \fB\fB-u\fR\fR
  76 .ad
  77 .RS 22n
  78 Unpack the file or files specified by \fBfile\fR.
  79 .RE
  80 
  81 .sp
  82 .ne 2
  83 .na
  84 \fB\fB\fR\fB-U\fR\fB \fR\fIcache-directory\fR\fR
  85 .ad
  86 .RS 22n
  87 Unpack all files in the specified cache directory.
  88 .RE
  89 
  90 .SH OPERANDS
  91 .sp
  92 .LP
  93 The following operands are supported:
  94 .sp
  95 .ne 2
  96 .na
  97 \fB\fBfile\fR\fR
  98 .ad
  99 .RS 8n
 100 A path name of a file to be packed or unpacked.
 101 .RE
 102 
 103 .SH USAGE
 104 .sp
 105 .LP
 106 See \fBlargefile\fR(5) for the description of the behavior of \fBcachefspack\fR
 107 when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
 108 .SH EXAMPLES
 109 .LP
 110 \fBExample 1 \fRPacking a File in the Cache
 111 .sp
 112 .LP
 113 The following example packs the file \fBprojects\fR in the cache:
 114 
 115 .sp
 116 .in +2
 117 .nf
 118 % cachefspack \fB-p\fR projects
 119 .fi
 120 .in -2
 121 .sp
 122 
 123 .LP
 124 \fBExample 2 \fRPackint Files in the Cache
 125 .sp
 126 .LP
 127 The following example packs the files \fBprojects\fR, \fBupdates\fR, and
 128 \fBmaster_plan\fR in the cache:
 129 
 130 .sp
 131 .in +2
 132 .nf
 133 % cachefspack \fB-p\fR projects updates master_plan
 134 .fi
 135 .in -2
 136 .sp
 137 
 138 .LP
 139 \fBExample 3 \fRUnpacking a File From the Cache
 140 .sp
 141 .LP
 142 The following example unpacks the file \fBprojects\fR from the cache:
 143 
 144 .sp
 145 .in +2
 146 .nf
 147 % cachefspack \fB-u\fR projects
 148 .fi
 149 .in -2
 150 .sp
 151 
 152 .LP
 153 \fBExample 4 \fRUnpacking Files From the Cache
 154 .sp
 155 .LP
 156 The following example unpacks the files \fBprojects\fR, \fBupdates\fR, and
 157 \fBmaster_plan\fR from the cache:
 158 
 159 .sp
 160 .in +2
 161 .nf
 162 % cachefspack \fB-u\fR projects updates master_plan
 163 .fi
 164 .in -2
 165 .sp
 166 
 167 .LP
 168 \fBExample 5 \fRUnpacking All Files From in a Cache Directory
 169 .sp
 170 .LP
 171 The following example unpacks all files in the cache directory \fBcache1\fR:
 172 
 173 .sp
 174 .in +2
 175 .nf
 176 % cachefspack \fB-U\fR /cache/cache1
 177 .fi
 178 .in -2
 179 .sp
 180 
 181 .LP
 182 \fBExample 6 \fRUsing a Packing List
 183 .sp
 184 .LP
 185 The following example illustrates the use of a packing list to specify files to
 186 be packed in the cache.
 187 
 188 .sp
 189 .LP
 190 The contents of \fBlists.pkg\fR are as follows:
 191 
 192 .sp
 193 .in +2
 194 .nf
 195 IGNORE SCCS BASE /src/junk LIST *.c LIST *.h
 196 .fi
 197 .in -2
 198 .sp
 199 
 200 .sp
 201 .LP
 202 The following command packs all files in the \fB/src/junk\fR directory which
 203 have \fB\&.c\fR and \fB\&.h\fR extensions, and do contain the string SCCS in
 204 the file's path name:
 205 
 206 .sp
 207 .in +2
 208 .nf
 209 % cachefspack \fB-f\fR lists.pkg
 210 .fi
 211 .in -2
 212 .sp
 213 
 214 .SH EXIT STATUS
 215 .sp
 216 .ne 2
 217 .na
 218 \fB\fB0\fR\fR
 219 .ad
 220 .RS 6n
 221 Successful completion.
 222 .RE
 223 
 224 .sp
 225 .ne 2
 226 .na
 227 \fB\fB>0\fR\fR
 228 .ad
 229 .RS 6n
 230 An error occurred.
 231 .RE
 232 
 233 .SH SEE ALSO
 234 .sp
 235 .LP
 236 \fBcfsadmin\fR(1M), \fBmount_cachefs\fR(1M), \fBpackingrules\fR(4),
 237 \fBattributes\fR(5), \fBlargefile\fR(5)