Forrest logo
back to the mksquashfs tool

mksquashfs:tldr:95139

mksquashfs: Create or append files and directories to a squashfs filesystem, [e]xcluding some of them.
$ mksquashfs ${filename_or_directory1 filename_or_directory2 ---} ${filesystem-squashfs} -e ${select}
try on your machine

This command is used to create a squashfs filesystem image from one or multiple specified files or directories. Here is a breakdown of its parts:

  • mksquashfs: This is the actual command that creates the squashfs filesystem image.
  • ${filename_or_directory1 filename_or_directory2 ---}: These are the input files or directories that will be included in the squashfs image. You can specify one or more files or directories, separated by spaces. For example, file1.txt dir2/ file3.pdf.
  • ${filesystem-squashfs}: This is the name and path of the output squashfs image file that will be created. For example, /path/to/filesystem.squashfs.
  • -e ${select}: This option is used to exclude certain files or directories from the squashfs image. ${select} is a placeholder for the specific files or directories that you want to exclude. For example, if you want to exclude file4.txt and dir3/, you would use -e file4.txt -e dir3/.

Putting it all together, the command will take the specified input files or directories and create a squashfs filesystem image with the given name and path, excluding any files or directories that are specified in the -e options.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mksquashfs tool