HOME

TheInfoList



OR:

File size is a measure of how much
data In the pursuit of knowledge, data (; ) is a collection of discrete values that convey information, describing quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted. ...
a
computer file A computer file is a computer resource for recording data in a computer storage device, primarily identified by its file name. Just as words can be written to paper, so can data be written to a computer file. Files can be shared with and transf ...
contains or, alternately, how much storage it consumes. Typically, file size is expressed in
units of measurement A unit of measurement is a definite magnitude of a quantity, defined and adopted by convention or by law, that is used as a standard for measurement of the same kind of quantity. Any other quantity of that kind can be expressed as a multip ...
based on the
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable uni ...
. By convention, file size units use either a
metric prefix A metric prefix is a unit prefix that precedes a basic unit of measure to indicate a multiple or submultiple of the unit. All metric prefixes used today are decadic. Each prefix has a unique symbol that is prepended to any unit symbol. The pre ...
(as in
megabyte The megabyte is a multiple of the unit byte for digital information. Its recommended unit symbol is MB. The unit prefix ''mega'' is a multiplier of (106) in the International System of Units (SI). Therefore, one megabyte is one million bytes o ...
and
gigabyte The gigabyte () is a multiple of the unit byte for digital information. The prefix '' giga'' means 109 in the International System of Units (SI). Therefore, one gigabyte is one billion bytes. The unit symbol for the gigabyte is GB. This definit ...
) or a
binary prefix A binary prefix is a unit prefix for multiples of units. It is most often used in data processing, data transmission, and digital information, principally in association with the bit and the byte, to indicate multiplication by a power of ...
(as in
mebibyte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable uni ...
and
gibibyte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable uni ...
). When a file is written to a
file system In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one lar ...
, which is the case in most modern devices, it may consume slightly more
disk space Computer data storage is a technology consisting of computer components and recording media that are used to retain digital data. It is a core function and fundamental component of computers. The central processing unit (CPU) of a compute ...
than the file requires. This is because the file system rounds the size up to include any unused space left over in the last
disk sector In computer disk storage, a sector is a subdivision of a track on a magnetic disk or optical disc. Each sector stores a fixed amount of user-accessible data, traditionally 512 bytes for hard disk drives (HDDs) and 2048 bytes for CD-ROMs and ...
used by the file. (A ''sector'' is the smallest amount of space addressable by the file system. The size of a disk sector ranges from several hundred to several thousand bytes.) The unused space is called slack space or internal fragmentation. Although smaller sector sizes allow for denser use of disk space, they decrease the operational efficiency of the file system.


Maximum size

The maximum file size a file system supports depends not only on the capacity of the file system, but also on the number of
bit The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented ...
s reserved for the storage of file size information. The maximum file size in the
FAT32 File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. It is often supported for compatibility reasons by ...
file system, for example, is 4,294,967,295 bytes, which is one byte less than four gigabytes. The table below details the maximum file size for a number of common or historical file systems.


Units of information

Bytes are the typical base unit of information. Larger files will typically have their sizes expressed using kilobyte, megabyte or gigabyte depending upon how large the file is. While these larger units are not as accurate as the byte size, most operating systems will expose the true byte size of a file by inspecting the file properties directly. Command line tools can also expose the exact byte size as well. A file system may display all sizes with the metric system with only 'kB' on small files indicating it, while some file systems/operating systems would display sizes in, the traditionally used on computers, binary system for all sizes, e.g. 'KB', while hard disk manufacturers use the metric system (for e.g. GB = 1,000,000,000 bytes and TB = 1000 GB). Kilobyte (KB) (JEDEC), is sometimes referred to unambiguously as
kibibyte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable uni ...
(KiB)(IEC). Sometimes kB, with lower cased SI-prefix 'k-' for kilo (1000), is used, then always equaling 1000 bytes. File transfers (e.g. "downloads") may use rates of units of bytes (e.g. MB/s) in binary rather than metric system, while networking hardware, such as
WiFi Wi-Fi () is a family of wireless network protocols, based on the IEEE 802.11 family of standards, which are commonly used for local area networking of devices and Internet access, allowing nearby digital devices to exchange data by radio waves ...
, always uses the metric system (Mbit/s, Gbit/s etc.). of units of
bit The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented ...
s (and it needs to send more than the files themselves, so some overhead needs to be factored in), making superficially similar terms very incompatible.


See also

*
Units of information In computing and telecommunications, a unit of information is the capacity of some standard data storage system or communication channel, used to measure the capacities of other systems and channels. In information theory, units of information a ...
*
Metric prefix A metric prefix is a unit prefix that precedes a basic unit of measure to indicate a multiple or submultiple of the unit. All metric prefixes used today are decadic. Each prefix has a unique symbol that is prepended to any unit symbol. The pre ...


Notes


References

{{Computer files Computer files