SQFSCAT(1)

✨ SQFSCAT(1) ✨

okay bestie, gather round πŸ’– this is a User Commands page, and it's about sqfscat β€” a whole little icon for yanking files out of a squashfs image and yeeting them straight to stdout. no cap.


🌸 NAME 🌸

sqfscat β€” the tool that literally cats files out of a squashfs filesystem and drops them on stdout. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

sqfscat [OPTIONS] FILESYSTEM [list of files to cat to stdout]

πŸ’– DESCRIPTION πŸ’–

Squashfs is a highly compressed read-only filesystem for Linux, and it's giving main character energy fr. 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. she does it all 🫢


✨ OPTIONS ✨

πŸŽ€ Runtime options:

  • -v, -version β€” print version, licence and copyright information. the receipts, basically πŸ“œ
  • -p NUMBER, -processors NUMBER β€” use NUMBER processors. By default will use the number of processors available.
  • -mem SIZE β€” use SIZE physical memory for caches. Use K, M or G to specify Kbytes, Mbytes or Gbytes respectively. Default 512 Mbytes.
  • -mem-percent PERCENT β€” use PERCENT physical memory for caches.
  • -o BYTES, -offset BYTES β€” skip BYTES at start of FILESYSTEM. Optionally a suffix of K, M or G can be given to specify Kbytes, Mbytes or Gbytes respectively (default 0 bytes).
  • -ig, -ignore-errors β€” treat errors writing files to stdout as non-fatal. she's unbothered πŸ’…
  • -st, -strict-errors β€” treat all errors as fatal. zero tolerance era 😭
  • -no-exit, -no-exit-code β€” don't set exit code (to nonzero) on non-fatal errors.

🧚 Filter options:

  • -no-wild, -no-wildcards β€” do not use wildcard matching in filenames.
  • -r, -regex β€” treat filenames as POSIX regular expressions rather than use the default shell wildcard expansion (globbing).

🌈 Help options:

  • -h, -help β€” print help summary information to pager (or stdout if not a terminal).
  • -help-option REGEX β€” print the help information for options matching REGEX to pager (or stdout if not a terminal).
  • -help-section SECTION β€” print the help information for section SECTION to pager (or stdout if not a terminal). If SECTION does not exactly match a section name, it is treated as a regular expression, and all section names that match are displayed. Use "list" as section name to get a list of sections and their names.
  • -help-all β€” print help information for all Sqfscat options and sections to pager (or stdout if not a terminal).
  • -ho REGEX β€” shorthand alternative to -help-option.
  • -hs SECTION β€” shorthand alternative to -help-section.
  • -ha β€” shorthand alternative to -help-all.
  • -no-pager β€” do not use a pager to output help information.
  • -cols WIDTH β€” use WIDTH columns to output help information. Useful if output is not to a terminal.

πŸ’€ EXIT STATUS πŸ’€

  • 0 β€” The file or files were output to stdout OK. slay ✨
  • 1 β€” FATAL errors occurred, e.g. filesystem corruption, I/O errors. Sqfscat did not continue and aborted. 😭
  • 2 β€” Non-fatal errors occurred, e.g. not a regular file, or failed to resolve pathname. Sqfscat continued and did not abort.

See -ignore-errors, -strict-errors and -no-exit-code options for how they affect the exit status. iykyk 🫢


πŸ“ DECOMPRESSORS AVAILABLE πŸ“

gzip, lzo, lz4, xz, zstd, lzma


πŸ‘‘ ENVIRONMENT πŸ‘‘

  • SQFS_CMDLINE β€” If set, this is used as the directory to write the file sqfs_cmdline which contains the command line arguments given to Sqfscat. Each command line argument is wrapped in quotes to ensure there is no ambiguity when arguments contain spaces. If the file already exists then the command line is appended to the file.
  • PAGER β€” If set, this is used as the name of the program used to display the help text. The value can be a simple command or a pathname. The default is /usr/bin/pager.

🌟 EXAMPLES 🌟

  • sqfscat IMAGE.SQFS hello Output the contents of "hello" to stdout.
  • sqfscat IMAGE.SQFS hello world Output the contents of "hello" and then "world" to stdout.
  • sqfscat IMAGE.SQFS "*.[ch]" Output the contents of all the files in the root directory that match the wildcard *.[ch], to stdout, e.g. hello.c, hello.h, world.c, world.h.
Note: when passing wildcarded names to Sqfscat, they should be quoted (as in the above examples), to ensure that they are not processed by the shell. fr fr, don't let your shell eat your asterisks πŸ™ˆ

πŸ’œ AUTHOR πŸ’œ

Written by Phillip Lougher <phillip@squashfs.org.uk>


Copyright Β© 2026 Phillip Lougher <phillip@squashfs.org.uk>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


⭐ SEE ALSO ⭐

mksquashfs(1), unsquashfs(1), sqfstar(1)

The README for the Squashfs-tools 4.7.5 release, describing the new features can be read here https://github.com/plougher/squashfs-tools/blob/master/Documentation/4.7.5/README.md

The Sqfscat usage guide can be read here https://github.com/plougher/squashfs-tools/blob/master/Documentation/4.7.5/USAGE-SQFSCAT.md

The CHANGELOG for Squashfs tools can be read here https://github.com/plougher/squashfs-tools/blob/master/CHANGES.md


and that's the whole page bestie!! πŸ’– this one's sqfscat version 4.7.5, dated March 2026 β€” periodt, go cat some files ✨ πŸ¦‹

πŸ“¦ where this page comes from