Block File Host Major Most That

file is a standard Unix program for determining the type of data contained in a computer file.

History

The original version of file originated in Unix Research Version 4 in 1973. System V saw a major update with several important changes, most notably moving the file type information into an external text file rather than compiling it into the binary itself.

All major BSD and Linux distributions use a free, open-source reimplementation which was written in 1986-87 by Ian Darwin from scratch. It was expanded by Geoff Collyer in 1989 and since then has had input from many others, including Guy Harris, Chris Lowth and Eric Fischer; from late 1993 onward its maintenance has been organized by Christos Zoulas.

Specification

The Single Unix Specification (SUS) specifies that a series of tests are performed on the file specified on the command line:

  1. if the file cannot be read, its status undetermined, or its type undetermined, file will indicate that the file was processed and its type was undetermined.
  2. file must be able to determine the types directory, FIFO, socket, block special, and character special
  3. zero-length files are identified as such
  4. an initial part of file is considered and file is to use position-sensitive tests
  5. the entire file is considered and file is to use context-sensitive tests
  6. the file is identified as a data file

file 's position-sensitive tests are normally implemented by matching various locations within the file against a textual database of magic numbers (see the Usage section). This differs from other simpler methods such as file extensions and schemes like MIME.

In most implementations, the file command uses a database to drive the probing of the lead bytes. That database is implemented in a file called "magic", whose location is usually in /etc/magic, /usr/share/file/magic or a similar location.

Usage

The SUS mandates the following options:

Other Unix and Unix-like operating systems may add extra options than these.

Examples

              # file file.cfile.c: C program text# file programprogram: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped# file /dev/wd0a/dev/wd0a: block special (0/0)# file -s /dev/hda1/dev/hda1: Linux/i386 ext2 filesystem# file -s /dev/hda5/dev/hda5: Linux/i386 swap file# file compressed.gzcompressed.gz: gzip compressed data, deflated, original filename, `compressed', last modified: Thu Jan 26 14:08:23 2006, os: Unix# file data.ppmdata.ppm: Netpbm PPM "rawbits" image data
            

References

  1. ^ See this copy of the UNIX V4 man page
  2. ^ The history of this program is recorded in its private CVS repository; see the log of the main program

See Also

  • libmagic

External links

  • file : determine file type – Commands & Utilities Reference, The Single UNIX® Specification, Issue 7 from The Open Group

Manual pages

  • file(1)  – OpenBSD General Commands Manual
  • file(1)  – Linux User Commands Manual

Blocking Unwanted Parasites with a Hosts File

The Hosts file contains the mappings of IP addresses to host names. ... You can use a HOSTS file to block ads ... for the HOSTS file. These updates are posted to most major ...

...

FileKicker - Download Service, File Hosting, File Downloads, Cheap ...

One click blocks 100's of sites, and you can create customized block lists. ... FileKicker sales tracking is integrated with most major e-commerce providers (eMetrix ...

...

Major IP Address Blocks For Solomon Islands

... you can find all major IP addresses blocks allocated for Solomon Islands. Most of these IP blocks are assigned for Internet providers and hosting ... comma-separated values file ...

...

Major IP Address Blocks For Aland Islands

... table, you can find all major IP addresses blocks allocated for Aland Islands. Most of these IP blocks are assigned for Internet providers and hosting ... comma-separated values file ...

...

VMware KB: "Cannot locate module block-major-XX" error appears in ...

"Cannot locate module block-major-XX" error appears in ... This article describes how to suppress most ... Enabling root SSH login on an ESX host (8375637). Create a new file by ...

...

Hosts File Block Lists

Topic: Hosts File Block Lists (Read 7414 times ... to block Akamai servers since a block by host ... where you can pull down the hosts file from that point in time (this is THE MAJOR ...

...

BLOCKS. Anonymous file-sharing.

Blocks needs your help to grow. Most importantly, we need people to host servers. ... to V0.14 if something major is ... When you 'upload' a file to your blocks server ...

...

SuperFastFile.Com 1-CLICK Web hosting - Easy File ...

Please Disable Ad-block. This FREE service uses 100+ TB ... W hen it comes to free file share hosting, SuperFastFile is an ... you the benefits of having a premium account of major ...

...

HADOOP-3293] When an input split spans cross block ...

Major Assignee: Jothi ... When an input split spans cross block boundary, the split location should be the host having most of ... File Attachments:

...

File Extentions to Block ?

Basically it blocks any executable file or data file ... The most obvious thing here is to send a shortcut to the file rather than send the ... BlackBerry Hosting; Exchange Hosting ...

...