1 2 #------------------------------------------------------------------------------ 3 # $File: commands,v 1.82 2026/02/16 14:39:53 christos Exp $ 4 # commands: file(1) magic for various shells and interpreters 5 # 6 #0 string/w : shell archive or script for antique kernel text 7 0 string/fwt #!\ /bin/sh POSIX shell script text executable 8 !:mime text/x-shellscript 9 0 string/fwb #!\ /bin/sh POSIX shell script executable (binary data) 10 !:mime text/x-shellscript 11 >10 string #\040This\040script\040was\040generated\040using\040Makeself \b, self-executable archive 12 >>53 string x \b, Makeself %s 13 14 0 string/fwt #!\ /bin/csh C shell script text executable 15 !:mime text/x-shellscript 16 17 # korn shell magic, sent by George Wu, gwu (a] clyde.att.com 18 0 string/fwt #!\ /bin/ksh Korn shell script text executable 19 !:mime text/x-shellscript 20 0 string/fwb #!\ /bin/ksh Korn shell script executable (binary data) 21 !:mime text/x-shellscript 22 23 0 string/fwt #!\ /bin/tcsh Tenex C shell script text executable 24 !:mime text/x-shellscript 25 0 string/fwt #!\ /usr/bin/tcsh Tenex C shell script text executable 26 !:mime text/x-shellscript 27 0 string/fwt #!\ /usr/local/tcsh Tenex C shell script text executable 28 !:mime text/x-shellscript 29 0 string/fwt #!\ /usr/local/bin/tcsh Tenex C shell script text executable 30 !:mime text/x-shellscript 31 32 # 33 # zsh/ash/ae/nawk/gawk magic from cameron (a] cs.unsw.oz.au (Cameron Simpson) 34 0 string/fwt #!\ /bin/zsh Paul Falstad's zsh script text executable 35 !:mime text/x-shellscript 36 0 string/fwt #!\ /usr/bin/zsh Paul Falstad's zsh script text executable 37 !:mime text/x-shellscript 38 0 string/fwt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable 39 !:mime text/x-shellscript 40 0 string/fwt #!\ /usr/bin/env\ zsh Paul Falstad's zsh script text executable 41 !:mime text/x-shellscript 42 43 0 string/fwt #!\ /bin/ash Neil Brown's ash script text executable 44 !:mime text/x-shellscript 45 0 string/fwt #!\ /usr/bin/ash Neil Brown's ash script text executable 46 !:mime text/x-shellscript 47 0 string/fwt #!\ /usr/local/bin/ash Neil Brown's ash script text executable 48 !:mime text/x-shellscript 49 0 string/fwt #!\ /usr/local/bin/ae Neil Brown's ae script text executable 50 !:mime text/x-shellscript 51 0 string/fwt #!\ /bin/nawk new awk script text executable 52 !:mime text/x-nawk 53 0 string/fwt #!\ /usr/bin/nawk new awk script text executable 54 !:mime text/x-nawk 55 0 string/fwt #!\ /usr/local/bin/nawk new awk script text executable 56 !:mime text/x-nawk 57 0 string/fwt #!\ /bin/gawk GNU awk script text executable 58 !:mime text/x-gawk 59 0 string/wt #!\ /usr/bin/gawk GNU awk script text executable 60 !:mime text/x-gawk 61 0 string/fwt #!\ /usr/local/bin/gawk GNU awk script text executable 62 !:mime text/x-gawk 63 # 64 0 string/fwt #!\ /bin/awk awk script text executable 65 !:mime text/x-awk 66 0 string/fwt #!\ /usr/bin/awk awk script text executable 67 !:mime text/x-awk 68 0 regex/4096 =^[\040\t\f\r\n]{0,100}BEGIN[\040\t\f\r\n]{0,100}[{] awk or perl script text 69 70 0 string/fwt #!\ /bin/lua Lua script text executable 71 !:mime text/x-lua 72 0 string/fwt #!\ /usr/bin/lua Lua script text executable 73 !:mime text/x-lua 74 0 string/fwt #!\ /usr/bin/env\ lua Lua script text executable 75 !:mime text/x-lua 76 0 string/fwt #!\ /bin/env\ lua Lua script text executable 77 !:mime text/x-lua 78 79 # AT&T Bell Labs' Plan 9 shell 80 0 string/fwt #!\ /bin/rc Plan 9 rc shell script text executable 81 82 # bash shell magic, from Peter Tobias (tobias (a] server.et-inf.fho-emden.de) 83 0 string/fwt #!\ /bin/bash Bourne-Again shell script text executable 84 !:mime text/x-shellscript 85 0 string/fwb #!\ /bin/bash Bourne-Again shell script executable (binary data) 86 !:mime text/x-shellscript 87 0 string/fwt #!\ /usr/bin/bash Bourne-Again shell script text executable 88 !:mime text/x-shellscript 89 0 string/fwb #!\ /usr/bin/bash Bourne-Again shell script executable (binary data) 90 !:mime text/x-shellscript 91 0 string/fwt #!\ /usr/local/bash Bourne-Again shell script text executable 92 !:mime text/x-shellscript 93 0 string/fwb #!\ /usr/local/bash Bourne-Again shell script executable (binary data) 94 !:mime text/x-shellscript 95 0 string/fwt #!\ /usr/local/bin/bash Bourne-Again shell script text executable 96 !:mime text/x-shellscript 97 0 string/fwb #!\ /usr/local/bin/bash Bourne-Again shell script executable (binary data) 98 !:mime text/x-shellscript 99 0 string/fwt #!\ /usr/bin/env\ bash Bourne-Again shell script text executable 100 !:mime text/x-shellscript 101 0 string/fwt #!\ /bin/env\ bash Bourne-Again shell script text executable 102 !:mime text/x-shellscript 103 104 0 string/fwt #!\ /bin/dash Dash shell script text executable 105 !:mime text/x-shellscript 106 0 string/fwt #!\ /usr/bin/dash Dash shell script text executable 107 !:mime text/x-shellscript 108 109 # Fish shell magic 110 # From: Benjamin Lowry <ben (a] ben.gmbh> 111 0 string/fwt #!\ /usr/local/bin/fish fish shell script text executable 112 !:mime text/x-shellscript 113 0 string/fwt #!\ /usr/bin/fish fish shell script text executable 114 !:mime text/x-shellscript 115 0 string/fwt #!\ /usr/bin/env\ fish fish shell script text executable 116 !:mime text/x-shellscript 117 118 0 search/1/fwt #!\ /usr/bin/tclsh Tcl/Tk script text executable 119 !:mime text/x-tcl 120 121 0 search/1/fwt #!\ /usr/bin/texlua LuaTex script text executable 122 !:mime text/x-luatex 123 0 search/1/fwt #!\ /usr/bin/env\ texlua LuaTex script text executable 124 !:mime text/x-luatex 125 0 search/1/fwt #!\ /bin/env\ texlua LuaTex script text executable 126 !:mime text/x-luatex 127 128 0 search/1/fwt #!\ /usr/bin/luatex LuaTex script text executable 129 !:mime text/x-luatex 130 131 0 search/1/fwt #!\ /usr/bin/stap Systemtap script text executable 132 !:mime text/x-systemtap 133 0 search/1/fwt #!\ /sbin/openrc-run OpenRC script text executable 134 !:mime text/x-shellscript 135 136 # From: Marc Chantreux <mc (a] unistra.fr> 137 # [Raku](https://raku.org/) script 138 0 string/fwt #!\ /bin/raku Raku (http://raku.org) script 139 !:mime text/x-raku 140 0 string/fwt #!\ /usr/bin/raku Raku (http://raku.org) script 141 !:mime text/x-raku 142 143 # From: Kylie McClain <kylie (a] somas.is> 144 # Type: execline scripts 145 # URL: https://skarnet.org/software/execline/ 146 0 string/fwt #!\ /command/execlineb execline script text executable 147 !:mime text/x-execline 148 0 string/fwt #!\ /bin/execlineb execline script text executable 149 !:mime text/x-execline 150 0 string/fwt #!\ /usr/bin/execlineb execline script text executable 151 !:mime text/x-execline 152 0 string/fwt #!\ /usr/bin/env\ execlineb execline script text executable 153 !:mime text/x-execline 154 155 0 string #! 156 >0 regex \^#!.*/bin/execlineb([[:space:]].*)*$ execline script text executable 157 !:mime text/x-execline 158 159 0 string #!/nix/store/ 160 >&-11 string/T x a %s script text executable 161 162 # PHP scripts 163 # Ulf Harnhammar <ulfh (a] update.uu.se> 164 0 search/1/c =<?php PHP script text 165 !:strength + 55 166 !:mime text/x-php 167 0 search/1 =<?\n PHP script text 168 !:mime text/x-php 169 0 search/1 =<?\r PHP script text 170 !:mime text/x-php 171 0 search/1/w #!\ /usr/local/bin/php PHP script text executable 172 !:strength + 55 173 !:mime text/x-php 174 0 search/1/w #!\ /usr/bin/php PHP script text executable 175 !:strength + 55 176 !:mime text/x-php 177 # Smarty compiled template, https://www.smarty.net/ 178 # Elan Ruusamae <glen (a] delfi.ee> 179 0 string =<?php 180 >5 regex [\ \n] 181 >>6 string /*\ Smarty\ version Smarty compiled template 182 >>>24 regex [0-9.]+ \b, version %s 183 !:mime text/x-php 184 185 0 string Zend\x00 PHP script Zend Optimizer data 186 187 # From: Anatol Belski <ab (a] php.net> 188 0 string OPCACHE 189 >7 ubyte 0 PHP opcache filecache data 190 191 0 search/64 --TEST-- 192 >16 search/64 --FILE-- 193 >24 search/8192 --EXPECT PHP core test 194 !:ext phpt 195 196 # https://www.php.net/manual/en/phar.fileformat.signature.php 197 -4 string GBMB PHP phar archive 198 >-8 ubyte 0x1 with MD5 signature 199 !:ext phar 200 >-8 ubyte 0x2 with SHA1 signature 201 !:ext phar 202 >-8 ubyte 0x3 with SHA256 signature 203 !:ext phar 204 >-8 ubyte 0x4 with SHA512 signature 205 !:ext phar 206 >-8 ubyte 0x10 with OpenSSL signature 207 !:ext phar 208 >-8 ubyte 0x11 with OpenSSL SHA256 signature 209 !:ext phar 210 >-8 ubyte 0x12 with OpenSSL SHA512 signature 211 !:ext phar 212 213 0 string/t $! DCL command file 214 215 # Type: Pdmenu 216 # URL: https://packages.debian.org/pdmenu 217 # From: Edward Betts <edward (a] debian.org> 218 0 string #!/usr/bin/pdmenu Pdmenu configuration file text 219 220 # From Danny Weldon 221 0 string \x0b\x13\x08\x00 222 >0x04 uleshort <4 ksh byte-code version %d 223 224 # From: arno <arenevier (a] fdn.fr> 225 # mozilla xpconnect typelib 226 # see https://www.mozilla.org/scriptable/typelib_file.html 227 0 string XPCOM\nTypeLib\r\n\032 XPConnect Typelib 228 >0x10 byte x version %d 229 >>0x11 byte x \b.%d 230 231 0 string/fwt #!\ /usr/bin/env\ runghc GHC script executable 232 0 string/fwt #!\ /usr/bin/env\ runhaskell Haskell script executable 233 0 string/fwt #!\ /usr/bin/env\ julia Julia script executable 234