This article needs additional citations for verification. (November 2015))
A filename extension, file name extension or file extension is a suffix to the name of a computer file (e.g.,
.md). The extension indicates a characteristic of the file contents or its intended use. A filename extension is typically delimited from the rest of the filename with a full stop (period), but in some systems it is separated with spaces. Other extension formats include dashes and/or underscores on early versions of Linux and some versions of IBM AIX.
Some file systems implement filename extensions as a feature of the file system itself and may limit the length and format of the extension, while others treat filename extensions as part of the filename without special distinction.
Filename extensions may be considered a type of
txtis the extension of the filename
htmlthe extension of
mysite.index.html). On file systems of some mainframe systems such as
BATindicate that a file is a program executable. In OS/360 and successors, the part of the dataset name following the last period, called the low level qualifier, is treated as an extension by some software, e.g., TSO
.tarindicates that the file is a tar archive of one or more files, and the
.gzindicates that the tar archive file is compressed with gzip
With the advent of graphical user interfaces, the issue of file management and interface behavior arose. Microsoft Windows allowed multiple applications to be associated with a given extension, and different actions were available for selecting the required application, such as a context menu offering a choice between viewing, editing or printing the file. The assumption was still that any extension represented a single file type; there was an unambiguous mapping between extension and icon.
The filename extension was originally used to determine the file's generic type.[
Some other operating systems that used filename extensions generally had fewer restrictions on filenames. Many allowed full filename lengths of 14 or more characters, and maximum name lengths up to 255 were not uncommon. The file systems in operating systems such as
The High Performance File System (HPFS), used in Microsoft and IBM's OS/2 also supported long file names and did not divide the file name into a name and an extension. The convention of using suffixes continued, even though HPFS supported extended attributes for files, allowing a file's type to be stored in the file as an extended attribute.
Microsoft's Windows NT's native file system, NTFS, supported long file names and did not divide the file name into a name and an extension, but again, the convention of using suffixes to simulate extensions continued, for compatibility with existing versions of Windows.
When the Internet age first arrived, those using Windows systems that were still restricted to 8.3 filename formats had to create web pages with names ending in
.HTM, while those using Macintosh or UNIX computers could use the recommended
.html filename extension. This also became a problem for programmers experimenting with the Java programming language, since it requires the four-letter suffix
.java for source code files and the five-letter suffix
.class for Java compiler object code output files.
Command name issues
This section may require cleanup to meet Wikipedia's quality standards. The specific problem is: intractable construction. (November 2015)
The use of a filename extension in a command name appears occasionally, usually as a side effect of the command having been implemented as a script, e.g., for the
On association-based systems, the filename extension is generally mapped to a single, system-wide selection of interpreter for that extension (such as ".py" meaning to use Python), and the command itself is runnable from the command line even if the extension is omitted (assuming appropriate setup is done). If the implementation language is changed, the command name extension is changed as well, and the OS provides a consistent API by allowing the same extensionless version of the command to be used in both cases. This method suffers somewhat from the essentially global nature of the association mapping, as well as from developers' incomplete avoidance of extensions when calling programs, and that developers can't force that avoidance. Windows is the only remaining widespread employer of this mechanism.
On systems with
The default behavior of
Later Windows versions (starting with
Some viruses take advantage of the similarity between the ".com" top-level domain and the ".COM" filename extension by emailing malicious, executable command-file attachments under names superficially similar to URLs (e.g., "myparty.yahoo.com"), with the effect that unaware users click on email-embedded links that they think lead to websites but actually download and execute the malicious attachments.
There have been instances of malware crafted to exploit vulnerabilities in some Windows applications which could cause a stack-based buffer overflow when opening a file with an overly long, unhandled filename extension.
The filename extension is just a marker and the content of the file does not have to match it.
There is no standard mapping between filename extensions and media types, resulting in possible mismatches in interpretation between authors, web servers, and client software when transferring files over the Internet. For instance, a content author may specify the extension svgz for a compressed
- ^ "What Is a File?" (PDF). z/VM - Version 7 Release 1 - CMS Primer (PDF). IBM. 2018-09-11. p. 7. SC24-6265-00.
One thing you need to know about creating files with z/VM is that each file needs its own three-part identifier. The first part of the identifier is the file name. The second part is the file type. And the third part is the file mode. These three file identifiers are often abbreviated fn ft fm.
- ISBN 9780782151282. Retrieved 2 October 2017.
- ^ File Extension .RPM Details from filext.com
- ^ File Extension .QIF Details from filext.com
- ^ File Extension .GBA Details from filext.com
- ^ "javac – Java programming language compiler". Sun Microsystems, Inc. 2004. Retrieved 2009-05-31.
Source code file names must have .java suffixes, class file names must have .class suffixes, and both source and class files must have root names that identify the class.
- ^ Commandname Extensions Considered Harmful
- ^ "What Is a File Extension?".
- Media related to Filename extensionsat Wikimedia Commons
- Data Formats Filename extension at Curlie
- Database of filename extensions at FileInfo.com