Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
File (command)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==History== The <code>file</code> command originated in [[Unix Research Version 4]]<ref>{{cite web|url=https://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man1/file.1|title=Source of the UNIX V4 "file" man page|access-date=2022-03-13|archive-date=2019-12-10|archive-url=https://web.archive.org/web/20191210000719/https://minnie.tuhs.org/cgi-bin/utree.pl?file=V4%2Fman%2Fman1%2Ffile.1|url-status=live}}</ref> in 1973. [[System V]] brought 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. Most major [[BSD]] and [[Linux]] distributions include a [[free software|free]], [[open-source software|open-source]] implementation that was written from scratch by Ian Darwin in 1986β87.<ref>The early history of this program is recorded in its private CVS repository; see [https://www.darwinsys.com/file/file.c.log.txt] {{Webarchive|url=https://web.archive.org/web/20170401080455/https://www.darwinsys.com/file/file.c.log.txt |date=2017-04-01 }} the log of the main program</ref> It keeps file type information in a text file with a format based on that of the System V version. 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. The [[OpenBSD]] system has its own subset implementation written from scratch, but still uses the Darwin/Zoulas collection of magic file formatted information. The {{code|file}} command was ported to the [[IBM i]] operating system.<ref>{{cite web |title=IBM System i Version 7.2 Programming Qshell |language=en |website=[[IBM]] |url=https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzahz/rzahzpdf.pdf?view=kc |access-date=2020-09-05 |archive-date=2021-03-05 |archive-url=https://web.archive.org/web/20210305180649/https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzahz/rzahzpdf.pdf?view=kc |url-status=live }}</ref> As of version 4.00 of the Ian Darwin/Christos Zoulas implementation of <code>file</code>, the functionality of the command is implemented in and exposed by a <code>libmagic</code> [[library (computing)|library]] that is accessible to consuming code via [[C (programming language)|C]] (and compatible) linking.<ref>{{man|3|libmagic|Linux}}</ref><ref>{{man|3|libmagic|NetBSD}}</ref><ref>{{cite mailing list |url=https://mx.gw.com/pipermail/file/2003/000034.html |title=file-3.41 is now available |date=February 27, 2003 |access-date=January 1, 2013 |mailing-list=File |last=Zoulas |first=Christos |archive-date=March 4, 2016 |archive-url=https://web.archive.org/web/20160304040612/https://mx.gw.com/pipermail/file/2003/000034.html |url-status=live }}</ref><ref>{{cite mailing list |url=https://mx.gw.com/pipermail/file/2003/000043.html |title=file-4.00 is now available |date=March 24, 2003 |access-date=January 1, 2013 |mailing-list=File |last=Zoulas |first=Christos |archive-date=December 28, 2016 |archive-url=https://web.archive.org/web/20161228123411/https://mx.gw.com/pipermail/file/2003/000043.html |url-status=live }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)