A computer file contains and stores information for use by a computer program. It is usually defined as being ‘durable’ storage as it is ready to use by other programs after the program that created it has finished executing.
Used in the context of computing as early as 1950, many people likened computer files to paper documents usually kept in offices of library files – which is where the term file originated from.
Most modern operating systems arrange files into one-dimensional arrays of bytes. A file contains a specific format and can differ in size.