]> wimlib.net Git - wimlib/blob - doc/imagex-extract.1.in
wimextract: Fix man page
[wimlib] / doc / imagex-extract.1.in
1 .TH WIMLIB-IMAGEX "1" "January 2014" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
2 .SH NAME
3 @IMAGEX_PROGNAME@-extract \- Extract files or directories from a WIM image
4 .SH SYNOPSIS
5 \fB@IMAGEX_PROGNAME@ extract\fR \fIWIMFILE\fR \fIIMAGE\fR [\fIPATH\fR...]  [\fIOPTION\fR...]
6 .br
7 \fB@IMAGEX_PROGNAME@ extract\fR \fIWIMFILE\fR \fIIMAGE\fR @\fILISTFILE\fR  [\fIOPTION\fR...]
8 .SH DESCRIPTION
9 \fB@IMAGEX_PROGNAME@ extract\fR extracts one or more files or directory trees
10 from the specified \fIIMAGE\fR contained in the Windows Imaging (WIM) file
11 \fIWIMFILE\fR.
12 This command is also available as simply \fBwimextract\fR if the appropriate hard
13 link or batch file has been installed.
14 .PP
15 \fB@IMAGEX_PROGNAME@ extract\fR is intended for extracting only a subset of a
16 WIM image.  If you want to extract or "apply" a full WIM image to a directory or
17 NTFS volume, use \fB@IMAGEX_PROGNAME@ apply\fR (1) instead.
18 .PP
19 \fIIMAGE\fR specifies the image in \fIWIMFILE\fR that contains the files or
20 directory trees to extract.  It may be a 1-based index of an image in the WIM or
21 the name of an image in the WIM.  Use the \fB@IMAGEX_PROGNAME@ info\fR (1)
22 command to show what images a WIM file contains.
23 .PP
24 Each \fIPATH\fR specifies a file or directory tree within the WIM image to
25 extract.  Alternatively, a single \fILISTFILE\fR beginning with the '@'
26 character is taken as a file that itself contains a list of files or directory
27 trees to extract.  See \fBPATH_SPECIFICATIONS\fR.
28 .PP
29 By default, files and directories are extracted to the current directory.  Use
30 \fB--dest-dir\fR to choose an alternate target directory.  Alternatively, use
31 \fB--to-stdout\fR to extract a file to standard output to pipe into another
32 program.
33 .PP
34 \fB@IMAGEX_PROGNAME@ extract\fR supports extracting files and directory trees
35 from stand-alone WIMs as well as split WIMs.  See \fBSPLIT WIMS\fR.
36 .SH PATH SPECIFICATIONS
37 Except when a single path is specified and prefixd by the '@' character, each
38 \fIPATH\fR specifies a file or directory tree within the WIM image to extract.
39 Each such path must be specified as an absolute path starting from the root of
40 the WIM image, like those output by the \fB@IMAGEX_PROGNAME@ dir\fR (1) command.
41 However, path separators may be either forward or backward slashes, and the
42 leading slash is optional; also, on Windows, the paths are treated
43 case-insensitively, while on UNIX, paths are treated case-sensitively, except
44 when overwritten through the \fBWIMLIB_IMAGEX_IGNORE_CASE\fR environmental
45 variable, as documented in \fB@IMAGEX_PROGNAME@\fR (1).
46 .PP
47 If no \fIPATH\fRs are provided, the default behavior is to extract the full
48 image, as if the path "/" had been provided.
49 .PP
50 If a single \fIPATH\fR is provided and is prefixed with the '@' character, it is
51 interpreted as the path to a \fILISTFILE\fR which must be a UTF-8 text file that
52 contains a list of paths (files or directories) to extract, one per line.  In
53 each line, leading and trailing whitespace is ignored, and lines beginning with
54 the ';' character and otherwise empty lines are ignored.  Each path must be
55 unquoted and must specify a full path in the WIM image, as described above.
56 However, unless \fB--no-wildcards\fR is specified, each path in the list file
57 may also contain the wildcard characters '?' and '*', and therefore may expand
58 to multiple actual files or directories.  By default, a path or wildcard glob
59 that matches no files or directories in the WIM image only produces a warning;
60 use \fB--strict-wildcards\fR if you want an error instead.  Also, when using a
61 list file, files and directories not located at the root of the WIM image will
62 be extracted to a corresponding subdirectory of the destination directory rather
63 than directly to the destination directory itself.
64 .SH SPLIT WIMS
65 You may use \fB@IMAGEX_PROGNAME@ extract\fR to extract files or directory trees
66 from a split WIM.  This uses the \fB--refs\fR="\fIGLOB\fR" option in the same
67 way as in other commands such as \fB@IMAGEX_PROGNAME@ apply\fR.  See
68 \fB@IMAGEX_PROGNAME@ apply\fR (1) for more details.
69 .SH OPTIONS
70 .TP 6
71 \fB--check\fR
72 When reading \fIWIMFILE\fR, verify its integrity if an integrity table is
73 present.
74 .TP
75 \fB--ref\fR="\fIGLOB\fR"
76 File glob of additional WIMs or split WIM parts to reference resources from.
77 See \fBSPLIT_WIMS\fR.  Note: \fIGLOB\fR is listed in quotes because it is
78 interpreted by \fB@IMAGEX_PROGNAME@\fR and may need to be quoted to protect
79 against shell expansion.
80 .TP
81 \fB--unix-data\fR
82 See the documentation for this option in \fB@IMAGEX_PROGNAME@-apply\fR (1).
83 .TP
84 \fB--no-acls\fR
85 See the documentation for this option in \fB@IMAGEX_PROGNAME@-apply\fR (1).
86 .TP
87 \fB--strict-acls\fR
88 See the documentation for this option in \fB@IMAGEX_PROGNAME@-apply\fR (1).
89 .TP
90 \fB--include-invalid-names\fR
91 See the documentation for this option in \fB@IMAGEX_PROGNAME@-apply\fR (1).
92 .TP
93 \fB--to-stdout\fR
94 Extract the files to standard output instead of to the filesystem.  This can
95 only be provided if all the specified \fIPATH\fRs are to regular files (not
96 directories or reparse points).  If present, alternate data streams are not
97 extracted.
98 .TP
99 \fB--dest-dir\fR=\fIDIR\fR
100 Extract the files and directories to the directory \fIDIR\fR instead of to the
101 current working directory.
102 .TP
103 \fB--no-wildcards\fR
104 Do not interpret wildcard characters in paths in the \fILISTFILE\fR.
105 .TP
106 \fB--strict-wildcards\fR
107 Fail if any wildcards or paths in \fILISTFILE\fR do not match any files in the
108 WIM image.  The default behavior is to warn only.
109 .SH NOTES
110 See the documentation \fB@IMAGEX_PROGNAME@ apply\fR (1) for documentation about
111 what data and metadata are extracted on UNIX-like systems versus on Windows.
112 .PP
113 On UNIX-like systems that support userspace filesystems with FUSE (e.g. Linux),
114 one can alternatively mount the WIM image with \fB@IMAGEX_PROGNAME@ mount\fR (1)
115 and then extract the desired files or directories using any standard
116 command-line or graphical program.
117 .PP
118 Reparse-point fixups (a.k.a. changing absolute symbolic links and junctions to
119 point within the extraction location) are never done by \fB@IMAGEX_PROGNAME@
120 extract\fR.  Use \fB@IMAGEX_PROGNAME@ apply\fR if you want this behavior.
121 .PP
122 Unlike \fB@IMAGEX_PROGNAME@ apply\fR, \fB@IMAGEX_PROGNAME@ extract\fR does not
123 support extracting files directly to a NTFS volume using libntfs-3g.
124 .PP
125 wimlib v1.6.0 and later can extract files from version 3584 WIMs, which usually
126 use packed, LZMS-compressed streams and may carry the \fI.esd\fR file extension
127 rather than \fI.wim\fR.  However, \fI.esd\fR files downloaded directly by the
128 Windows 8 web downloader have encrypted segments, and wimlib cannot extract such
129 files until they are first decrypted.  Furthermore, such files are not designed
130 for random access, so extracting individual files from them may be slow.
131 .SH EXAMPLES
132 Extract a file from the first image in "boot.wim" to the current directory:
133 .RS
134 .PP
135 @IMAGEX_PROGNAME@ extract boot.wim 1 /Windows/System32/notepad.exe
136 .RE
137 .PP
138 Extract a file from the first image in "boot.wim" to standard output:
139 .RS
140 .PP
141 @IMAGEX_PROGNAME@ extract boot.wim 1 /Windows/System32/notepad.exe \\
142 .br
143 .RS
144 --to-stdout
145 .RE
146 .RE
147 .PP
148 Extract a file from the first image in "boot.wim" to the specified directory:
149 .RS
150 .PP
151 @IMAGEX_PROGNAME@ extract boot.wim 1 /Windows/System32/notepad.exe \\
152 .br
153 .RS
154 --dest-dir=somedir
155 .RE
156 .RE
157 .PP
158 Extract the "sources" directory from the first image in "boot.wim" to the
159 current directory:
160 .RS
161 .PP
162 @IMAGEX_PROGNAME@ extract boot.wim 1 /sources
163 .RE
164 .PP
165 Extract multiple files and directories in one command:
166 .RS
167 .PP
168 @IMAGEX_PROGNAME@ extract boot.wim 1 /Windows/Fonts \\
169 .br
170 .RS
171 /sources /Windows/System32/cmd.exe
172 .RE
173 .RE
174 .PP
175 Extract files using a list file:
176 .RS
177 .PP
178 @IMAGEX_PROGNAME@ extract install.wim 1 @files.txt
179 .RE
180 .PP
181  ...  where files.txt could be something like:
182 .PP
183 .RS
184 .RS
185 .nf
186 Windows\\System32\\*.*
187 Windows\\System32\\??-??\\*.*
188 Windows\\System32\\en-US\\*.*
189 .RE
190 .RE
191 .fi
192 .SH SEE ALSO
193 .BR @IMAGEX_PROGNAME@ (1)
194 .BR @IMAGEX_PROGNAME@-apply (1)
195 .BR @IMAGEX_PROGNAME@-dir (1)
196 .BR @IMAGEX_PROGNAME@-info (1)
197 .BR @IMAGEX_PROGNAME@-mount (1)