|
A filename is a special kind of string used to uniquely identify a file stored on the file system of a computer. Depending on the operating system, such a name may also identify a directory. Different operating systems impose different restrictions regarding length and allowed characters on filenames. A filename includes one or more of these components: In computer programming and formal language theory, (and other branches of mathematics), a string is an ordered sequence of symbols. ...
This article is about computer files and file systems in general terms. ...
For library and office filing systems, see Library classification. ...
In computing, a directory, catalog, or folder, is an entity in a file system which can contain a group of files and/or other directories. ...
An operating system (OS) is the software that manages the sharing of the resources of a computer and provides programmers with an interface used to access those resources. ...
- protocol (or scheme) — access method (e.g., http, ftp, file etc.)
- host (or network-ID) — host name, IP address, domain name, or LAN network name (e.g., wikipedia.org, 207.142.131.206, MYCOMPUTER, SYS:, etc.)
- device (or node) — port, socket, drive, root mountpoint, disc, volume (e.g., C:, /, SYSLIB, etc.)
- directory (or path) — directory tree (e.g., /usr/bin, TEMP, [USR.LIB.SRC], etc.)
- file — base name of the file
- type (format or extension) — indicates the content type of the file (e.g., .txt, .exe, .dir, etc.)
- version — revision number of the file
In order to refer to a file on a remote computer (aka: host, server) the remote computer must be known. The remote computer name or address might part of the file name, or it might be specified at the time a file system is "mounted", in which case it won't necessarily be part of the file name. In some systems, if a filename does not contain a path part, the file is assumed to be in the current working directory. For computer operating systems that support a hierarchial file system, the working directory is the directory path that a user or program has designated to be the directory for files referenced by name only, or by a relative path (as contrasted with using both a files name and a...
Many operating systems, including MS-DOS, Microsoft Windows, and VMS systems, allow a filename extension that consists of one or more characters following the last period in the filename, thus dividing the filename into two parts: the basename (the primary filename) and the extension (usually indicating the file type associated with a certain file format). On these systems the extension is considered part of the filename, and on systems which allow (for example) an eight character basename followed by a three character extension, a filename with an extension of "" or " " (nothing, or three spaces) will still be 11 characters long (since the "." is supplied, but not considered as part of the name, by the OS). On Unix-like systems, files will often have an extension (for example prog.c, denoting the C-language source code of a program called "prog"); but since the extension is not considered a separate part of the filename, a file on a Unix system which allows 14-character filenames, and with a filename which uses "." as an "extension separator" or "delimiter", could possibly have a filename such as a.longxtension Microsofts disk operating system, MS-DOS, was Microsofts implementation of DOS, which was the first popular operating system for the IBM PC, and until recently, was widely used on the PC compatible platform. ...
Windows redirects here. ...
VMS is a three-letter abbreviation with multiple meanings, as described below: Virtual Memory System (another name for OpenVMS), an operating system Variable message sign, an electronic traffic sign often used on highways Visual Memory System (better known as Visual Memory Unit), a storage device for the Sega Dreamcast console...
A filename extension is a suffix to the name of a computer file applied to show its format. ...
A file format is a particular way to encode information for storage in a computer file. ...
Diagram of the relationships between several Unix-like systems A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification. ...
C is a general-purpose, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ...
Source code (commonly just source or code) is any series of statements written in some human-readable computer programming language. ...
Within a single directory, filenames must be unique. However, two files in different directories may have the same name. On Unix, however, upper-case and lower-case are considered different, so that files MyName and myname would be valid names for different files in the directory; historically, names with upper-case characters in them have come before those with all-lower-case names in them in directory (folder) listings; many Unix software vendors use this scheme to make important files, such as INSTALL or README, appear in listings before relatively less important files or directories (like lib). A readme (or read me) file contains information about other files in a directory and is very commonly distributed with computer software. ...
Unix-like systems allow a file to have more than one name; in traditional Unix-style file systems, the names are hard links to the file's inode or equivalent. Hard links are different from Windows shortcuts, Mac OS aliases, or symbolic links. In computing, a hard link is a reference, or pointer, to physical data on a storage volume. ...
In computing, an inode is a data structure on a traditional Unix-style file system such as UFS. An inode stores basic information about a regular file, directory, or other file system object. ...
Computer shortcuts are small files containing only the location of another file. ...
This article relates to both the original Classic Mac OS as well as Mac OS X, Apples more recent operating system. ...
In System 7 and later, an alias is a small file that represents another object in the file system. ...
In computing, a symbolic link (often shortened to symlink and also known as a soft link) consists of a special type of file that serves as a reference to another file. ...
Reserved characters and words
Many operating systems prohibit control characters from appearing in file names. Unix-like systems are an exception, as the only control character forbidden in file names is the null character, as that's the end-of-string indicator in C. Trivially, Unix also excludes the path separator / from appearing in filenames. Some operating systems prohibit some particular characters from appearing in file names: | Character | Name | Reason | | / | slash | used as a path name component separator in Unix-like and Amiga systems. Traditionally used for command line switches in MS-DOS and Windows, but can also be used as a path name component separator in some instances. [1] | | backslash | used as a path name component separator in MS-DOS and Windows, and as the escape character in Unix systems, see Note 1 | | ? | question mark | used as a wildcard in Unix, Windows and AmigaOS; marks a single character. | | % | percent sign | used as a wildcard in RT-11; marks a single character. | | * | asterisk | used as a wildcard in Unix, MS-DOS, RT-11, VMS and Windows. Marks any sequence of characters (Unix, Windows, later versions of MS-DOS) or any sequence of characters in either the basename or extension (thus "*.*" in early versions of MS-DOS means "all files". See note 1 | | : | colon | used to determine the mount point / drive on Windows; used to determine the virtual device or physical device such as a drive on AmigaOS, RT-11 and VMS; used as a pathname separator in classic Mac OS. Doubled after a name on VMS, indicates the DECnet nodename (equivalent to a NetBIOS (Windows networking) hostname preceded by "".) | | | | vertical bar | designates software pipelining in Windows, see Note 1 | | " | quotation mark | used to mark beginning and end of filenames containing spaces in Windows, see Note 1 | | < | less than | used to redirect input, allowed in Unix filenames, see Note 1 | | > | greater than | used to redirect output, allowed in Unix filenames, see Note 1 | | . | period | allowed but the last occurrence will be interpreted to be the extension separator in VMS, MS-DOS and Windows. In other OSes, usually considered as part of the filename, and more than one full stop may be allowed. | Note 1: Most Unix shells require certain characters such as spaces, <, >, |, , and sometimes :, (, ), &, ;, to be quoted or escaped: Due to technical limitations, /. redirects here. ...
The backslash ( ) is a typographical mark (glyph) used chiefly in computing. ...
The question mark(?) (also known as an interrogation point, query,[1] or eroteme) is a punctuation mark that replaces the full stop at the end of an interrogative sentence. ...
AmigaOS is the default native operating system of the Amiga personal computer. ...
The percent sign (%) is the symbol used to indicate a percentage (that the preceding number is divided by one hundred). ...
RT-11 (for Run Time or Real Time) was a real-time operating system for the DEC PDP-11. ...
An asterisk (*), is a typographical symbol or glyph. ...
This article is about colons in punctuation. ...
RT-11 (for Run Time or Real Time) was a real-time operating system for the DEC PDP-11. ...
This article relates to both the original Classic Mac OS as well as Mac OS X, Apples more recent operating system. ...
Vertical bar, verti-bar, vertical line, divider line, or pipe is the name of the character (|). Broken bar (¦) is a separate character. ...
A pipeline of three programs run on a text terminal In Unix-like computer operating systems, a pipeline is the original software pipeline: a set of processes chained by their standard streams, so that the output of each process (stdout) feeds directly as input (stdin) of the next one. ...
Quotation marks or inverted commas (also called quotes and speech marks) are punctuation marks used in pairs to set off speech, a quotation, a phrase or a word. ...
This article is about inequalities in mathematics. ...
This article is about inequalities in mathematics. ...
A full stop or period (sometimes stop, full point or dot), is the punctuation mark commonly placed at the end of several different types of sentences in English and many other languages. ...
Screenshot of a sample Bash session, taken on Gentoo Linux. ...
five and six<seven (example of escaping) 'five and six<seven' or "five and six<seven" (examples of quoting) In Windows the space and the period are not allowed as the final character of a filename. The period is allowed as the first character, but certain Windows applications, such as Windows Explorer, forbid creating or renaming such files (despite this convention being used in Unix-like systems to describe hidden files and directories). Among workarounds are using different explorer applications or saving a file from an application with the desired name.[1] Windows Explorer running on Windows Vista Windows Explorer running on Windows XP Windows Explorer is an application that is part of modern versions of the Microsoft Windows operating system that provides a graphical user interface for accessing the file systems. ...
There are very few or no other articles that link to this one. ...
Some file systems on a given operating system (especially file systems originally implemented on other operating systems), and particular applications on that operating system, may apply further restrictions and interpretations. See comparison of file systems for more details on restrictions imposed by particular file systems. The following tables compare general and technical information for a number of file systems. ...
In Unix-like systems, MS-DOS, and Windows, the file names "." and ".." have special meanings (current and parent directory respectively). In addition, in Windows and DOS, some words might also be reserved and can not be used as filenames.[1] For example, DOS Device file: This article is about the family of closely related operating systems for the IBM PC compatible platform. ...
A device file or special file is an interface for a device driver that appears in a file system as if it were an ordinary file. ...
CON, PRN, AUX, CLOCK$, NUL COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9 LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Operating systems that have these restrictions cause incompatibilities with some other filesystems. For example, Windows will fail to handle, or raise error reports for, these legal UNIX filenames: aux.c, q"uote"s.txt, or NUL.txt.
Comparison of file name limitations -
| System | Alphabetic Case Sensitivity | Allowed Character Set | Reserved Characters | Reserved Words | Maximum Length | Comments | | MS-DOS FAT | case-insensitive case-destruction | A–Z 0–9 - _ | all except allowed | | 8 + 3 | | | Commodore 64 | case-sensitive case-preservation | any | :,= shift-space | | 16 | Actual limit depends on the drive used, but most drives limit the length to 16 characters. | | Win95 VFAT | case-insensitive | any | |?*<":>+[]/ control characters | | 255 | | | WinXP NTFS | optional | any | |?*<":>/ control characters | aux, con, prn | 260 | | | OS/2 HPFS | case-insensitive case-preservation | any | |?*<":>/ | | 254 | | | Mac OS HFS | case-insensitive case-preservation | any | : | | 255 | Finder is limited to 31 characters | | Mac OS HFS+ | case-insensitive case-preservation | any | : on disk, in classic Mac OS, and at the Carbon layer in Mac OS X; / at the Unix layer in Mac OS X | | 255 | Mac OS 8.1 - Mac OS X | | most UNIX file systems | case-sensitive case-preservation | any | / null | | 255 | a leading . indicates that ls and file managers will not by default show the file | | early UNIX (AT&T) | case-sensitive case-preservation | any | / | | 14 | a leading . indicates a "hidden" file | | POSIX "Fully portable filenames"[2] | case-sensitive case-preservation | A–Za–z0–9._- | / null | Filenames to avoid include: a.out, core, .profile, .history, .cshrc | 14 | hyphen must not be first character | | AmigaOS | case-insensitive case-preservation | any | :/" | | 107 | dos.library | | Amiga OFS | case-insensitive case-preservation | any | :/" | | 30 | Original File System 1985 | | Amiga FFS | case-insensitive case-preservation | any | :/" | | 30 | Fast File System 1988 | | Amiga PFS | case-insensitive case-preservation | any | :/" | | 255 | Professional File System 1993 | | Amiga SFS | case-insensitive case-preservation | any | :/" | | 32,000 | Smart File System 1998 | | Amiga FFS2 | case-insensitive case-preservation | any | :/" | | 107 | Fast File System 2 2002 | | BeOS BFS | case-sensitive | UTF-8 | / | | 255 | | | DEC PDP-11 RT-11 | case-insensitive | RADIX-50 | | | 6 + 3 | Flat filesystem with no subdirs. A full "file specification" includes device, filename and extension (file type) in the format: dev:filnam.ext. | | DEC VAX VMS | case-insensitive | A–Z 0–9 _ | | | 32 per component; earlier 9 per component; latterly, 255 for a filename and 32 for an extension. | a full "file specification" includes nodename, diskname, directory/ies, filename, extension and version in the format: OURNODE::MYDISK:[THISDIR.THATDIR]FILENAME.EXTENSION;2 Directories can only go 8 levels deep. | | ISO 9660 | case-insensitive | A–Z 0–9 _ . | | | 255 | 8 directory levels max (for Level 1 conformance) | The following tables compare general and technical information for a number of file systems. ...
Microsofts disk operating system, MS-DOS, was Microsofts implementation of DOS, which was the first popular operating system for the IBM PC, and until recently, was widely used on the PC compatible platform. ...
File Allocation Table (FAT) is a partially patented file system developed by Microsoft for MS-DOS and was the primary file system for consumer versions of Microsoft Windows up to and including Windows Me. ...
C-64 redirects here. ...
Windows 95 (codename Chicago) is a hybrid 16-bit/32-bit graphical operating system released on August 24, 1995 by the Microsoft Corporation. ...
File Allocation Table (FAT) is a partially patented file system developed by Microsoft for MS-DOS and was the primary file system for consumer versions of Microsoft Windows up to and including Windows Me. ...
NTFS is the standard file system of Windows NT, including its later versions Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, and Windows Vista. ...
HPFS or High Performance File System is a file system created specifically for the OS/2 operating system to improve upon the limitations of the FAT file system. ...
This article relates to both the original Classic Mac OS as well as Mac OS X, Apples more recent operating system. ...
Hierarchical File System (HFS), is a file system developed by Apple Computer for use on computers running Mac OS. Originally designed for use on floppy and hard disks, it can also be found on read-only media such as CD-ROMs. ...
This article relates to both the original Classic Mac OS as well as Mac OS X, Apples more recent operating system. ...
HFS Plus or HFS+ is a file system developed by Apple Computer to replace their Hierarchical File System (HFS) as the primary file system used on Macintosh computers. ...
Carbon is the codename of Apple Computers API for the Macintosh operating system, which permits a good degree of forward and backward compatibility between source code written to run on the classic Mac OS, and the newer Mac OS X. The APIs are published and accessed in the form...
Filiation of Unix and Unix-like systems Unix (officially trademarked as UNIX®, sometimes also written as or ® with small caps) is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. ...
For other uses, see LS. ls is a command specified by POSIX and the Single UNIX Specification, and is thus implemented in Unix and Unix-like operating systems. ...
Filiation of Unix and Unix-like systems Unix (officially trademarked as UNIX®, sometimes also written as or ® with small caps) is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. ...
This article is about the current AT&T. For the 1885-2005 company, see American Telephone & Telegraph. ...
POSIX or Portable Operating System Interface[1] is the collective name of a family of related standards specified by the IEEE to define the application programming interface (API) for software compatible with variants of the Unix operating system. ...
AmigaOS is the default native operating system of the Amiga personal computer. ...
On the Amiga the Old File System was the filesystem for Amiga OS before the Amiga Fast File System. ...
The Amiga Fast File System (FFS) is an advanced file system used on the Amiga personal computer. ...
The Professional File System is a filesystem originally developed commercially for the Amiga. ...
The Smart File System (SFS) is a journalling filesystem used on Amiga computers. ...
BeOS is an operating system for personal computers which began development by Be Inc. ...
The Be File System (BFS, occasionally misnamed as BeFS) is the native file system for the BeOS operating system. ...
UTF-8 (8-bit UCS/Unicode Transformation Format) is a variable-length character encoding for Unicode. ...
The DEC logo Digital Equipment Corporation was a pioneering American company in the computer industry. ...
The PDP-11 was a 16-bit minicomputer sold by Digital Equipment Corp. ...
RT-11 (for Run Time or Real Time) was a real-time operating system for the DEC PDP-11. ...
RADIX50 is a character encoding created by DEC for use on their PDP series and DECsystem-10 and DECSYSTEM-20 computers. ...
The DEC logo Digital Equipment Corporation was a pioneering American company in the computer industry. ...
VAX is a 32-bit computing architecture that supports an orthogonal instruction set (machine language) and virtual addressing (i. ...
OpenVMS[1] (Open Virtual Memory System or just VMS) is the name of a high-end computer server operating system that runs on the VAX[2] and Alpha[3] family of computers developed by Digital Equipment Corporation of Maynard, Massachusetts (DIGITAL was then purchased by Compaq, and is now owned...
ISO 9660, a standard published by the International Organization for Standardization, defines a file system for CD-ROM media. ...
See also For library and office filing systems, see Library classification. ...
Long filename is the name given to the longer and therefore more descriptive titles on the FAT filesystem, which was previously restricted to eight characters and a three-character extension (referred to as 8. ...
A path is the general form of a file or directory name, giving a files name and its unique location in a file system. ...
A Uniform Resource Identifier (URI), is a compact string of characters used to identify or name a resource. ...
âURLâ redirects here. ...
References - ^ a b Naming a file msdn.microsoft.com (MSDN), filename restrictions on Windows
- ^ Lewine, Donald. POSIX Programmer's Guide: Writing Portable UNIX Programs 1991 O'Reilly & Associates, Inc. Sebastopol, CA pp63-64
External links |