(1) General Commands Manual (1) file - file [-bcdEhiklLNnprsSvzZ0] [--apple] [--exclude-quiet] [--extension] [--mime-encoding] [--mime-type] [-e testname] [-F separator] [-f namefile] [-m magicfiles] [-P name=value] file ... file -C [-m magicfiles] file [--help] 5.47 file. file . : . . text ( ASCII) executable ( UNIX ) data ( "" ). ( core tar) . . "text". "shell commands text" "shell script". stat(2). . ( (FIFOs) ) . . a.out ( ) . " " . " " . . /usr/share/file/misc/magic.mgc /usr/share/file/misc/magic . $HOME/.magic.mgc $HOME/.magic . . ASCII ISO-8859-x Extended-ASCII 8 ISO ( Macintosh IBM PC) Unicode UTF-8 Unicode UTF-16 EBCDIC . . ASCII ISO-8859-x UTF-8 extended-ASCII "text" UTF-16 EBCDIC "character data" . file . CR CRLF NEL LF . . file . ( ) . .br troff(1) struct C. . ( tar(1) JSON). "data". --apple file MacOS . . (apple- style). -b, --brief ( ). -C, --compile magic.mgc . -c, --checking-printout . -m . -d stderr. -E ( ) POSIX . -e, --exclude testname testname . : apptype EMX ( EMX). ascii ( `encoding'). encoding (soft magic). tokens . cdf (Compound Document Files). compress . csv (CSV). elf ELF elf. json JSON (RFC-7159) . soft . simh SIMH. tar tar tar 512 . . text `ascii'. --exclude-quiet --exclude file. file. --extension . -F, --separator separator . `:'. -f, --files-from namefile namefile ( ) . namefile `-' . namefile . file. : "-F @ -f namefile" : "-f namefile -F @". -h, --no-dereference ( ). POSIXLY_CORRECT. -i, --mime file mime . `text/plain; charset=us-ascii' "ASCII text". --mime-type, --mime-encoding -i . -k, --keep-going . `\012- '. ( -r.) ( -l) . -l, --list magic(5) ( -k). -L, --dereference ls(1) ( ). POSIXLY_CORRECT. -m, --magic-file magicfiles . . . -N, --no-pad . -n, --no-buffer stdout . . . -p, --preserve-date utime(3) utimes(2) file . -P, --parameter name=value . bytes 1M elf_notes 256 ELF elf_phnum 2K ELF elf_shnum 32K ELF elf_shsize 128MB ELF encoding 65K indir 50 name 150 / regex 8K -r, --raw \ooo. file . -s, --special-files file stat(2) . . -s file . . file stat(2) . -S, --no-sandbox libseccomp (https://github.com/seccomp/libseccomp) -S (sandboxing) . file -z . . -v, --version . -z, --uncompress . -Z, --uncompress-noreport . -0, --print0 `\0' . cut(1) . . file NUL ( ERROR: text) NUL . --help . MAGIC . file $HOME/.magic. file ".mgc" . POSIXLY_CORRECT ( ) file . file . -L -h. /usr/share/file/misc/magic.mgc . /usr/share/file/misc/magic . file 0 >0 . ( POSIX) -E: o o o $ file file.c file /dev/{wd0a,hda} file.c: C program text file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped /dev/wd0a: block special (0/0) /dev/hda: block special (3/0) $ file -s /dev/wd0{b,d} /dev/wd0b: data /dev/wd0d: x86 boot sector $ file -s /dev/hda{,1,2,3,4,5,6,7,8,9,10} /dev/hda: x86 boot sector /dev/hda1: Linux/i386 ext2 filesystem /dev/hda2: x86 boot sector /dev/hda3: x86 boot sector, extended partition table /dev/hda4: Linux/i386 ext2 filesystem /dev/hda5: Linux/i386 swap file /dev/hda6: Linux/i386 swap file /dev/hda7: Linux/i386 swap file /dev/hda8: Linux/i386 swap file /dev/hda9: empty /dev/hda10: empty $ file -i file.c file /dev/{wd0a,hda} file.c: text/x-c file: application/x-executable /dev/hda: application/x-not-regular-file /dev/wd0a: application/x-not-regular-file hexdump(1), od(1), strings(1), magic(5) System V FILE(CMD) . System V . ( ) . System V . >10 string language impress (imPRESS data) >10 string language\ impress (imPRESS data) . 0 string \begindata Andrew Toolkit document 0 string \\begindata Andrew Toolkit document SunOS 3.2 Sun Microsystems file System V . Sun . `&' >16 long&0x7fffffff >0 not stripped libseccomp (https://github.com/seccomp/libseccomp) file . file -z. -S. USENET . Christos Zoulas ( ) . . . . file ( /usr/share/file/misc/magic.orig). file UNIX Research Version 4 ( 1973). System V : . . System V Ian Darwin . John Gilmore . Geoff Collyer . `&' Rob McMahon 1989. Guy Harris 1993 . 1990 Christos Zoulas . Chris Lowth 2000: -i mime . Eric Fischer 2000 ASCII. Reuben Thomas 2007 2011 MIME MIME MIME . `magic' ( ) . . . (c) Ian F. Darwin 1986-1999. Berkeley Software Distribution COPYING . tar.h is_tar.c John Gilmore tar(1) . https://bugs.astron.com/ ( https://mailman.astron.com/mailman/listinfo/file ). MIME APPLE . . : ( ) . . MAGIC_CONTINUE \012- . encoding.c !:charset. . Debian BTS . %s . #271672. . ( #466037). file -ki MIME . zip Office2007 . URL . MIME ( !:mime ). hash-bang . . "name" "use" ( "name" "use" "name" ). "name" / "use" . ^ (endianness) . ( HOWMANY file.h) . . . . FTP ftp.astron.com /pub/file/file-X.YZ.tar.gz. 3: https://www.gnu.org/licenses/gpl-3.0.html . . : kde-l10n-ar@kde.org Linux 7.0.8-arch1-1 17 2025 Linux 7.0.8-arch1-1