Home  >  Article  >  What is a collection of related information recorded on disk called?

What is a collection of related information recorded on disk called?

青灯夜游
青灯夜游Original
2020-12-10 16:43:5922627browse

A collection of related information recorded on disk is called a "file". A file is a collection of information stored on a computer using a computer disk as a carrier. It is a data stream stored in some kind of long-term storage device or temporary storage device, and is under the management of the computer file system. Files can be divided into structured files and unstructured files: in structured files, the file is composed of several related records; while unstructured files are regarded as a character stream.

What is a collection of related information recorded on disk called?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

A collection of related information recorded on disk is called a "file".

What is a computer file

In a computer, a file is a collection of information stored on the computer using the computer hard disk as a carrier. It is a data stream stored in some kind of long-term storage device or temporary storage device, and is managed by the computer file system.

The so-called "long-term storage devices" generally refer to disks, optical disks, tapes, etc. "Short-term storage device" generally refers to computer memory.

It should be noted that files stored in long-term storage devices are not necessarily long-term storage. Some may also be temporary data generated during the operation of the program or system and will be deleted after the program or system exits.

A file refers to a set of related elements with a file name defined by the creator. It can be divided into two types: structured files and unstructured files. In a structured file, the file is composed of several related records; while an unstructured file is regarded as a character stream. A file is the largest data unit in a file system and describes a set of objects. For example, you can record the students in a class as a file. A file must have a file name, which is usually composed of a string of ASCII codes or (and) Chinese characters. The length of the name varies depending on the system. For example, in some systems, the name is stipulated to be 8 characters, while in other systems, 14 characters are allowed. Users use file names to access files. In addition, the file should have its own attributes, which can include:

(1) File type. File types can be specified from different perspectives, such as source files, target files, and executable files.

(2) File length. File length refers to the current length of the file. The unit of length can be bytes, words or blocks, or it can be the maximum allowed length.

(3) The physical location of the file. This attribute is usually a pointer indicating which device the file is on and where on the device it is.

(4) The creation time of the file. This refers to the last modification time of the file, etc.

File types

In order to facilitate the management and control of files, files are divided into several types. Because different systems manage files differently, their methods of classifying files vary greatly. In order to facilitate the system and users to understand the file type, in many OS, the file type is appended to the file name as an extension, and the file name and extension are separated by a "." symbol. The following are several commonly used file classification methods.

Classification by purpose

According to the nature and purpose of the file, files can be divided into three categories:

(1) System files. This refers to files made up of system software. Most system files only allow users to call them, but they do not allow users to read them, let alone modify them; some system files are not directly open to users.

(2) User files. Refers to files composed of user's source code, object files, executable files or data, etc. Users entrust these files to the system for safekeeping.

(3) Library file. This is a file composed of standard subroutines and commonly used routines. This type of file allows users to call it, but not modify it.

By data form

According to this method, files can also be divided into three categories:

(1) Source file. This refers to a file consisting of source programs and data. Files usually formed by source programs and data input by a terminal or input device are source files. It usually consists of ASCII code or Chinese characters.

(2) Target file. This refers to a file composed of object code that has been compiled by the compiler of the corresponding language but has not been linked by the linker. It is a binary file. Usually, the suffix used by the object file is ".obj".

(3) Executable file. This refers to the file formed by linking the compiled object code through the linker.

Access control attributes

According to the access control attributes specified by the system administrator or user, files can be divided into three categories:

(1) Only execute the file. This type of file can only be called and executed by approved users, neither reading nor writing is allowed.

(2) Read-only file. This type of file is only allowed to be read by the file owner and approved users, but not written.

(3) Read and write files. This refers to files that the file owner and authorized users are allowed to read or write.

Organization and Processing Class

According to the organization form of the file and the way the system processes it, files can be divided into three categories:

(1) Ordinary file: a character file composed of ASCII code or binary code. Source program files, data files, object code files created by general users, and the operating system's own code files, library files, utility files, etc. are all ordinary files, and they are usually stored on external storage devices.

(2) Directory files: System files composed of file directories and used to manage and implement file system functions. Information about other files can be retrieved through directory files. Since directory files are also composed of character sequences, the same file operations as ordinary files can be performed on them.

(3) Special files: specifically refers to various I/O devices in the system. In order to facilitate unified management, the system treats all input/output devices as files and provides them to users in the form of files. Directory retrieval, permission verification, etc. are similar to ordinary files, except that the operations on these files are the same as those on the devices. Drivers are closely connected, and the system converts these operations into operations for specific devices. According to the different device data exchange units, special files can be divided into block device files and character device files. The former is used for I/O operations on block devices such as disks, optical disks, or tapes, while the latter is used for I/O operations on character devices such as terminals and printers.

If you want to read more related articles, please visit PHP Chinese website! !

The above is the detailed content of What is a collection of related information recorded on disk called?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn