aboutsummaryrefslogtreecommitdiff
path: root/doc/sqfs2tar.1
blob: a71f6039c5e41514e814cde48d0b7ad32cba7174 (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
.TH SQFS2TAR "1" "June 2019" "sqfs2tar" "User Commands"
.SH NAME
sqfs2tar \- turn a squashfs image into a tar archive
.SH SYNOPSIS
.B sqfs2tar
[\fI\,OPTIONS\/\fR...] \fI\,<sqfsfile>\/\fR
.SH DESCRIPTION
Read a squashfs archive and turn it into a tar archive, written to stdout.

The idea is to quickly and painlessly turn a squashfs filesystem image into
a tar archive that can then be examined and processed by any tool that can
work on tar archives.
.PP
Possible options:
.TP
\fB\-\-subdir\fR, \fB\-d\fR <dir>
Unpack the given sub directory instead of the filesystem root. Can be specified
more than once to select multiple directories. If only one is specified, it
becomes the new root of node of the archive file system tree.
.TP
\fB\-\-keep\-as\-dir\fR, \fB\-k\fR
If \fB\-\-subdir\fR is used only once, don't make the subdir the archive root,
instead keep it as prefix for all unpacked files. Using \fB\-\-subdir\fR more
than once implies \fB\-\-keep\-as\-dir\fR.
.TP
\fB\-\-no\-xattr\fR, \fB\-X\fR
Discard extended attributes from the squashfs image. The default behavior is
to copy all xattrs attached to squashfs inodes into the resulting tar archive.
.TP
\fB\-\-no\-skip\fR, \fB\-s\fR
Abort if file cannot be stored in a tar record instead of skipping it.
.TP
\fB\-\-help\fR, \fB\-h\fR
Print help text and exit.
.TP
\fB\-\-version\fR, \fB\-V\fR
Print version information and exit.
.SH COMPATIBILITY
To be compatible with as many tools as possible, the output format is pre-POSIX
ustar archive using GNU extensions where necessary. This seems to be more
widely supported by many tar programs (besides GNU tar), even more than the
newer POSIX format and PAX extensions.

It is not possible to store socket files in a tar or pax archive. Also, in the
current implementation, all extended attribuates are lost.

If any file or directory is encountered that cannot be converted, it is
skipped and a warning is written to stderr. Unless the \fB\-\-no\-skip\fR
option is set, which aborts processing if a file cannot be converted.
.SH EXAMPLES
Turn a squashfs image into a tar archive:
.IP
sqfs2tar rootfs.sqfs > rootfs.tar
.TP
Turn a squashfs image into a gzip'ed tar archive:
.IP
sqfs2tar rootfs.sqfs | gzip > rootfs.tar.gz
.TP
Turn a squashfs image into an LZMA2 compressed tar archive:
.IP
sqfs2tar rootfs.sqfs | xz > rootfs.tar.xz
.SH SEE ALSO
rdsquashfs(1), tar2sqfs(1)
.SH AUTHOR
Written by David Oberhollenzer.
.SH COPYRIGHT
Copyright \(co 2019 David Oberhollenzer
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.