Jump to content

ATTRIB: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Line 9: Line 9:
| latest release version =
| latest release version =
| latest release date =
| latest release date =
| operating system = [[ISIS (operating system)|ISIS-II]], [[DOS]], [[OS/2]], [[Microsoft Windows]], [[ReactOS]], [[SymbOS]]
| operating system = [[ISIS (operating system)|ISIS-II]], [[DOS]], [[OS/2]], [[Microsoft Windows|Windows]], [[ReactOS]], [[SymbOS]]
| genre = [[Command (computing)|Command]]
| genre = [[Command (computing)|Command]]
| license =
| license =
| website =
| website =
}}
}}
In [[computing]], '''<code>ATTRIB</code>''' is a [[command (computing)|command]] in [[ISIS (operating system)|ISIS-II]],<ref>[http://bitsavers.org/pdf/intel/ISIS_II/9800306-06_ISIS-II_Users_Guide_May81.pdf ISIS II Users Guide]</ref> [[DOS]], [[OS/2]], [[Microsoft Windows]] and [[ReactOS]] that allows the user to change various characteristics, or "[[File attributes|attributes]]" of a [[computer file]] or [[directory (computing)|directory]]. The command is also available in the [[Unified Extensible Firmware Interface|EFI shell]].<ref name="EFI-Shells-and-Scripting">{{cite web
In [[computing]], '''<code>ATTRIB</code>''' is a [[command (computing)|command]] in [[Intel]] [[ISIS (operating system)|ISIS-II]],<ref>[http://bitsavers.org/pdf/intel/ISIS_II/9800306-06_ISIS-II_Users_Guide_May81.pdf ISIS II Users Guide]</ref> [[DOS]], [[IBM]] [[OS/2]],<ref>http://www.jatomes.com/Help/Os2Cmd.php#ATTRIB</ref> [[Microsoft]] [[Microsoft Windows|Windows]]<ref>[https://technet.microsoft.com/en-us/library/bb490868 Microsoft TechNet Attrib article]</ref> and [[ReactOS]]<ref>https://github.com/reactos/reactos/blob/master/base/shell/cmd/attrib.c</ref> that allows the user to change various characteristics, or "[[File attributes|attributes]]" of a [[computer file]] or [[directory (computing)|directory]]. The command is also available in the [[Unified Extensible Firmware Interface|EFI shell]].<ref name="EFI-Shells-and-Scripting">{{cite web
| url = http://software.intel.com/en-us/articles/efi-shells-and-scripting/
| url = http://software.intel.com/en-us/articles/efi-shells-and-scripting/
| title = EFI Shells and Scripting
| title = EFI Shells and Scripting
Line 52: Line 52:


}}
}}

==Further reading==
*{{Cite book|author-last=Cooper|author-first=Jim|title=Special Edition Using MS-DOS 6.22, Third Edition|date=2001|publisher=[[Que Publishing]]|isbn=978-0789725738}}
*{{Cite book|first=Peter|last=Dyson|year=1995|title=Mastering OS/2 Warp|publisher=[[Sybex]]|isbn=978-0782116632}}
*{{Cite book|author=John Paul Mueller|year=2007|title=Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000|publisher=[[Wiley (publisher)|John Wiley & Sons]]|isbn=978-0470165799}}


==External links==
==External links==
{{Wikibooks|Guide to Windows Commands}}
{{Wikibooks|Guide to Windows Commands}}
*[https://technet.microsoft.com/en-us/library/bb490868 Microsoft TechNet Attrib article]
*[https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/attrib attrib | Microsoft Docs]
*[http://www.computerhope.com/attribhl.htm Microsoft DOS ATTRIB command]
*[http://www.computerhope.com/attribhl.htm Microsoft DOS ATTRIB command]



Revision as of 13:16, 27 July 2019

attrib
Developer(s)Intel, IBM, Microsoft, Phil Brutsche, ReactOS Contributors
Initial release1984, 39–40 years ago (DOS version)
Operating systemISIS-II, DOS, OS/2, Windows, ReactOS, SymbOS
TypeCommand

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]

Background

Several Microsoft 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 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]

History

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]

The FreeDOS version was developed by Phil Brutsche.[10]

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.[11] Changing the system attribute was not possible in early versions of Windows, thus requiring use of ATTRIB.[11] 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.[12] Manipulating the archive bit allowed users to control which files were backed up using the BACKUP command.[7]

See also

References

  1. ^ ISIS II Users Guide
  2. ^ http://www.jatomes.com/Help/Os2Cmd.php#ATTRIB
  3. ^ Microsoft TechNet Attrib article
  4. ^ https://github.com/reactos/reactos/blob/master/base/shell/cmd/attrib.c
  5. ^ "EFI Shells and Scripting". Intel. Retrieved 2013-09-25.
  6. ^ IBM Disk Operating System Version 4.00 Technical Reference (1st ed.). July 1988. p. 3:5.
  7. ^ a b c Petzold, Charles (June 10, 1986). "Changing DOS File Attributes". PC Magazine. pp. 249–262.
  8. ^ "DOS Attrib". Encyclopedia. PC Magazine. Retrieved 2007-08-02.
  9. ^ "Using ATTRIB, CHKDSK, or DIR Command to Locate Files". Microsoft. Archived from the original on 2014-09-01. Retrieved 2017-11-01. {{cite web}}: Unknown parameter |dead-url= ignored (|url-status= suggested) (help)
  10. ^ http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/attrib.html
  11. ^ a b O'Reilly, Tim; Mott, Troy; Glenn, Walter J. (1999). Windows 98 in a Nutshell: A Desktop Quick Reference. O'Reilly. pp. 303–306. ISBN 1-56592-486-X.
  12. ^ Jones, James G.; Landes, Craig (2003). A+ Exam Cram 2: Windows 2000 Directory Services Infrastructure. Que. pp. 309–310. ISBN 0-7897-2867-2.

Further reading