File attributes

The following describes the terminology for non * nix-compatible systems (DOS, OS / 2, Windows). The nix family of operating systems and their file storage methods are different and require separate consideration.

File attributes are special tags that allow the file system to identify actions that can be performed on them. The appearance of such attributes was caused by the need to increase the resiliency of the file system. Since the information in the file system is stored sequentially, there should be signs by which it will be possible to distinguish the file from the directory, the system folder from the backup.

At a low level, this is implemented by special methods (marking) of the initial and final clusters of the storage device. But only low-level programs, such as the operating system, have access to such addressing. For the application software , special marks have been added to this marking, which allow changing file attributes.

There are a small number of them, since initially they appeared in old operating and file systems, and their support by modern OSs is the need for compatibility.

File attributes are as follows:

- Read only. It means that the file is not allowed to be written, and it is intended for reading. If available, the OS does not allow changes to be made to the file. The attribute is relevant for storing constant information or data with limited access.

- System. System file or directory. Serves for an increased degree of protection of system information about data and equipment. An object with such an attribute is much more difficult to modify or delete. In some cases, the OS completely blocks access to such files - only the kernel of the operating system can use them .

- Archive. Signals that a change has been made to the file. This attribute is critical for backup. With a large amount of redundant information, there is a significant acceleration in updating archives, if only the changed data is copied - objects that have file attributes - archive.

- Hidden - a hidden file. Most often used in conjunction with the system attribute. This attribute makes the file invisible when viewing the contents of a directory.

The average user does not use file properties when working with files. An exception can be considered only a few points:

  1. If files and folders suddenly “disappeared” on removable media or hard drive. This happens very often when a computer becomes infected with a certain type of virus that changes the file attributes to “system” and “hidden”. Do not panic, the problem is solved trivially. You can change file attributes through the file’s “Properties” dialog box or by using any explorer program (with the exception of Microsoft Explorer). Also, if you can access the command line, you can view and change the file attributes with the ATTRIB system command. Running it with the key "/?" You can see a list of possible actions with files.

  2. The opposite situation - there are a number of files that you need to limit access to, prevent their change or the ability to delete. Then changing the file attributes will allow you to cope with this task.

  3. Setting the “archive” attribute allows you to effectively make current backups when multiple users work on the same project. Project consolidation systems can be configured to provide the latest versions of the data for all users with remote access.

Currently, with the advent of modern file systems, an increase in security requirements and the speed of information processing, file attributes are no longer in demand. They were replaced by complex add-ons with indexes, caching, and parallel access.

Source: https://habr.com/ru/post/C23607/


All Articles