FILE(1) General Commands Manual FILE(1) file - file [-bcdEhiklLNnprsSvzZ0] [--apple] [--exclude-quiet] [--extension] [--mime-encoding] [--mime-type] [-e _] [-F ] [-f _] [-m __] [-P =] file ... file -C [-m __] file [--help] 5.45 file. file . , : , . . , , : text ( , , , ASCII), executable ( , UNIX ) data (, , "" ). ( , tar), . , , . , "text". , , "shell commands text" "shell script". , stat(2). , . , , (, (FIFO) , ), , . . ( ), a.out, , , , include. " ", UNIX, , . " " . - . /usr/share/file/misc/magic.mgc /usr/share/file/misc/magic, . , $HOME/.magic.mgc $HOME/.magic, . , , . ASCII, ISO-8859-x, 8- ISO ASCII ( Macintosh IBM PC), UTF-8 Unicode, UTF-16 Unicode EBCDIC , . - , (). ASCII, ISO-8859-x, UTF-8, ASCII "text", , , - ; UTF-16 EBCDIC "character data", , , , . , file . CR, CRLF NEL, Unix LF, . , . file , , , . ( ), - . , .br , troff(1), , struct C. , . ( tar(1) JSON). , , "data". --apple file , MacOS. . , -- . , apple. -b, --brief ( ). -C, --compile magic.mgc, . -c, --checking-printout . , , -m . -d stderr. -E ( ), , POSIX, , . -e, --exclude _ _ , . : apptype EMX ( EMX). ascii ( , `encoding'). encoding . tokens , . cdf (CDF). compress . csv , (CSV). elf ELF, elf. json JSON (RFC-7159) . soft . simh SIMH. tar tar 512 tar. , . text `ascii'. --exclude-quiet --exclude, , file. file. --extension . -F, --separator . `:'. -f, --files-from _ , , _ ( ) . _ . , `-' . , , _ , , . file invocation. , , , : "-F @ -f _", : "-f _ -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 __ , . , . , . -N, --no-pad , . -n, --no-buffer stdout . , . , . -p, --preserve-date , utime(3) utimes(2), , , file . -P, --parameter = . bytes 1M , elf_notes 256 ELF elf_phnum 2K ELF elf_shnum 32K ELF elf_shsize 128MB ELF encoding 65K , indir 50 name 50 / 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 , . 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 Interface Definition of 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's . `&', , , >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, , , , , , ' Python Python. ` ' ( magic) . . . . Ian F. Darwin, , , 1986-1999. Berkeley Software Distribution; . COPYING . tar.h is_tar.c John Gilmore tar(1) (public domain). . , https://bugs.astron.com/ ( https://mailman.astron.com/mailman/listinfo/file, ). , MIME APPLE , . . : , (, ) , , . . MAGIC_CONTINUE \012- ; . encoding.c. , !:_. . . Debian, . , , %s, . Debian 271672. , . ( Debian 466037). , file -ki , MIME. zip, Office2007 . . ' MIME (, !:mime, - ). . , , , . "name" "use" ( "name", "use", "name" ). "name" / "use" . ^ , , . , , ( HOWMANY file.h), . , . , , , . , . FTP ftp.astron.com /pub/file/file-X.YZ.tar.gz. Andriy Rysin Yuri Chornoivan ; , GNU General Public License Version 3: https://www.gnu.org/licenses/gpl-3.0.html. . , , : trans-uk@lists.fedoraproject.org Linux 6.8.2-arch2-1 21 2023 Linux 6.8.2-arch2-1