Sometimes what you think is obvious and simple really is not. If my father in his 50s asked me what is a computer file, how would I answer?
A file is a self contained entity stored on a computer. It represent a singular entity for the computer and the user. It can be for example a document, a graphic, a spreadsheet, an audio, or a video.
A file can be moved, sent or saved as a single entity. Moving a file, sending it, renaming it doesn't change the contents of the file. When you read and write a file to an encrypted cloud storage or send it by email, the contents of the file are unaltered.
If you send a file that contains a document, that document will be readable on any computer that features the correct software to open it. That property of a file is called the format of the file.
A file format is a convention that decides how the data inside the file is arranged to reprensent its contents. For example, the CSV format that is sometimes used to store tables of data has each element of a line separated by a comma and each line separated by a line feed character. and if an element contains either a
" quotation mark, a line feed or a
, comma there are some ways to handle those.
Here is a list of some file formats:
- ODF: Open Document Format is a format for storing documents that can be read and modified
- PDF: Portable Document Format is a format for storing documents that are meant to be printed or read but not modified
- BMP: BitMap Picture is a format used to store pictures
- PNG: Portable Network Graphics is a format used to store pictures in an efficient fashion
- DOCX: Microsoft's document format commonly used by software such as Microsoft Office Word
An executable file is a file that contains data that the computer or another software recognize as instructions to be performed. For example somewhere on your computer lies an executable file which is your web browser, another one that is your calculator, and another one that is your printer driver (the bit of software that makes your computer able to communicate with your printer).
Executable files have to be handled carefully: it is hard to know for sure if they are safe or not without lots of skill and analysis. Some companies or individual use digital signatures to prove the origin (and hence the safety) of their software. This makes those executable files more trustworthy as a malicious person would have to steal the credentials of the company to sign in their stead.
Other file properties
Files generally are associated with other properties. The most common is a name. Generally filenames are of the form
Name of the file.SMH where
SMH is some 2 to 4 letter acronym. This acronym is called the extension of the file name. It is there to guide someone reading the file name into which format the file is. For example a file named
something.png is probably a picture in the PNG format.
You may find in your SStorage security device a file named
authentication.cbor where CBOR is the format in which data is stored for authentication.
Files are also associated with permissions. If you have a shared encrypted storage or a company intranet, you may have encountered cases where the system prevents you from opening a file due to a lack of permissions.
Files also generally have timestamps to track when was the last modification of the file.
Files and folders
Files are generally organized in a hierarchy of folders, also named directories. This is an organizational unit that allows files to be found much more easily.
Directories are file themselves, this allows to track their changes just like any normal files when an application needs to for example.
This should teach you all the basics of what a file is if you are new to computers, as well as point out what is obvious to you if you are not and need to explain it.
If you like my content and want more, please donate. If everyone that finds my content useful paid $1 every week, I would be able to produce content for 1 week a month without relying on other sources of income for that week.