File Concept
Computer store information in storage media such as disk, tape drives, and optical disks. The operating system provides a logical view of the information stored in the disk. This logical storage unit is a file.
The information stored in files are non-volatile, means they are not lost during power failures. A file is named collection of related information that is stored on physical storage.
Data cannot be written to a computer unless it is written to a file. A file, in general, is a sequence of bits, bytes, lines, or records defined by its owner or creator. The file has a structure defined by its owner or creator and depends on the file type.
- Text file – It has a sequence of characters.
- Image file – It has visual information such as photographs, vectors art and so on.
- Source file – It has subroutines and function that are compiled later.
- Object file – It has a sequence of bytes, organized into bytes and used by the linker.
- Executable file – The binary code that the loader brings to memory for execution is stored in an exe file.
File Attributes
A file has a single e editable name given by its creator. The name never changes unless a user has necessary permission to change the file name. The names are given because it is humanly understandable.
The properties of a file can be different on many systems, however, some of them are common:
- Name – unique name for a human to recognize the file.
- Identifier – A unique number tag that identifies the file in the file system, and non-human readable.
- Type – Information about the file to get support from the system.
- Size – The current size of the file in bytes, kilobytes, or words.
- Access Control – Defines who could read, write, execute, change, or delete the file in the system.
- Time, Date, and User identification – This information kept for date created, last modified, or accessed and so on.
The information about the file is kept in a directory structure which also resides on the secondary storage.
0 Comments