Английская Википедия:ATTRIB

Материал из Онлайн справочника
Перейти к навигацииПерейти к поиску

Шаблон:Infobox software In computing, ATTRIB is a command in Intel ISIS-II,[1] DOS, IBM OS/2,[2] Microsoft Windows[3] and ReactOS[4] that allows the user to change various characteristics, or "attributes" of a computer file or directory. The command is also available in the EFI shell.[5]

History

Several operating systems provided a set of modifiable file characteristics that could be accessed and changed through a low-level system call. For example, as of release MS-DOS 4.0, the first six bits of the file attribute byte indicated whether or not a file was read-only (as opposed to writeable), hidden, a system file, a volume label, a subdirectory, or if the file had been "archived" (with the bit being set if the file had changed since the last use of the BACKUP command).[6] However, initial releases of the operating system did not provide user-level method for reading or changing these values.[7]

The initial version of the ATTRIB command for DOS was first included in version 3.0 of PC DOS, with functionality limited to changing the read-only attribute.[7] Subsequent versions allowed the read-only, hidden, system and archive bits to be set.[8] MS-DOS version 3.3 added the capability of recursive searching through subdirectories to display attributes of specified files.[9]

Digital Research DR DOS 6.0[10] and Datalight ROM-DOS[11] also include an implementation of the Шаблон:Code command.

The FreeDOS version was developed by Phil Brutsche and is licensed under the GPLv2.[12]

Uses

Setting the read-only bit of a file provided only partial protection against inadvertent deletion: while commands such as del and erase would respect the attribute, other commands such as DELTREE did not.[13] Changing the system attribute was not possible in early versions of Windows, thus requiring use of ATTRIB.[13] Similarly, a system crash in early versions of Windows could lead to a situation where a temporary file had the read-only bit set and was additionally (and irrevocably) locked by the Windows OS; in this instance, booting into DOS (thus avoiding the Windows lock) and unsetting the read-only attribute with ATTRIB was the recommended way of deleting the file.[14] Manipulating the archive bit allowed users to control which files were backed up using the BACKUP command.[7]

See also

References

Шаблон:Reflist

Further reading

External links

Шаблон:Wikibooks

Шаблон:Windows commands

  1. ISIS II Users Guide
  2. Шаблон:Cite web
  3. Microsoft TechNet Attrib article
  4. reactos/attrib.c at master · reactos/reactos · GitHub
  5. Шаблон:Cite web
  6. Ошибка цитирования Неверный тег <ref>; для сносок TR не указан текст
  7. 7,0 7,1 7,2 Ошибка цитирования Неверный тег <ref>; для сносок Petzold не указан текст
  8. Ошибка цитирования Неверный тег <ref>; для сносок PCM не указан текст
  9. Ошибка цитирования Неверный тег <ref>; для сносок MSDN не указан текст
  10. Шаблон:Cite web
  11. Шаблон:Cite web
  12. Шаблон:Cite web
  13. 13,0 13,1 Ошибка цитирования Неверный тег <ref>; для сносок ora не указан текст
  14. Ошибка цитирования Неверный тег <ref>; для сносок Jones не указан текст