summaryrefslogtreecommitdiffstats
path: root/generate-manpages/unsquashfs.h2m
blob: edbf1656c8ea623aeb18570bfc65ffb5276a4ada (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
[Name]
unsquashfs - tool to uncompress, extract and list squashfs filesystems

[Description]
Squashfs is a highly compressed read-only filesystem for Linux.
It uses either gzip/xz/lzo/lz4/zstd compression to compress both files, inodes
and directories.  Inodes in the system are very small and all blocks are
packed to minimise data overhead. Block sizes greater than 4K are supported
up to a maximum of 1Mbytes (default block size 128K).

Squashfs is intended for general read-only filesystem use, for archival
use (i.e. in cases where a .tar.gz file may be used), and in constrained
block device/memory systems (e.g. embedded systems) where low overhead is
needed.

[Examples]
.TP
unsquashfs IMAGE.SQFS
Extract IMAGE.SQFS to "squashfs-root" in the current working directory.
.TP
unsquashfs -d output IMAGE.SQFS
Extract IMAGE.SQFS to "output" in the current working directory.
.TP
unsquashfs -d . IMAGE.SQFS
Extract IMAGE.SQFS to current working directory.
.TP
unsquashfs -linfo IMAGE.SQFS
Output a listing of IMAGE.SQFS with file attributes to stdout, while extracting
the filesystem to "squashfs-root".
.TP
unsquashfs -lls IMAGE.SQFS
Output a listing of IMAGE.SQFS with file attributes to stdout, but do not
extract the filesystem.  The listing will be prefixed with "squashfs-root".
.TP
unsquashfs -d "" -lls IMAGE.SQFS
Output a listing of IMAGE.SQFS with file attributes to stdout, but do not
extract the filesystem.  The listing will not be prefixed with "squashfs-root".
.TP
unsquashfs IMAGE.SQFS fs/squashfs
Extract only the "fs/squashfs" directory.
.TP
unsquashfs IMAGE.SQFS "[Tt]est/example*"
Extract all files beginning with "example" inside top level directories
called "Test" or "test".
.TP
unsquashfs -excludes IMAGE.SQFS "test/*data*.gz"
This will extract everything except for files that match *data*.gz in the
test directory.  The -excludes option tells Unsquashfs to exclude the files
on the command line rather than extract them.
.TP
unsquashfs -excludes IMAGE.SQFS "... *.gz"
This will extract everything except for files that match *.gz anywhere
in the image.   The "..." means this is a non-anchored exclude which
matches anywhere.
.TP
unsquashfs -ex "test/*data*.gz" \; IMAGE.SQFS test
This uses both extract and exclude options, to tell Unsquashfs to only
extract the "test" directory, and to exclude any files within it that
match *data*.gz.
.TP
unsquashfs -ex "... *.gz" IMAGE.SQFS test
This uses both extract and exclude options, to tell Unsquashfs to only
extract the "test" directory, and to exclude files which match "*.gz"
anywhere within "test" directory or sub-directories.
.TP
unsquashfs -dest output -max-depth 2 IMAGE.SQFS
Extract only the top two levels of IMAGE.SQFS to "output" directory.
.TP
unsquashfs -max-depth 2 IMAGE.SQFS "test/*.gz"
Only extract the gzipped files in the test directory.
.TP
unsquashfs -llc -max-depth 2 IMAGE.SQFS "test/*.gz"
Output a listing of the gzipped files in the test directory to stdout,
but do not extract them.
.TP
unsquashfs -no-xattrs IMAGE.SQFS
Do not extract any extended attributes.  Any extended attributes in the
filesystem will be ignored.
.TP
unsquashfs -xattrs-include "^user." IMAGE.SQFS
Filter the extended attributes and only extract extended attributes in the
user namespace from the Squashfs filesystem.
.TP
unsquashfs -xattrs-exclude "^user." IMAGE.SQFS
Filter the extended attributes and do not extract any extended attributes in
the user namespace from the Squashfs filesystem.
.PP
Note: when passing wildcarded names to Unsquashfs, they should be quoted (as in
the above examples), to ensure that they are not processed by the shell.