- Attrib
attrib is a command, in
MS-DOS ,OS/2 andMicrosoft Windows . The function of attrib is to set and removefile attribute s (read-only, archive, system and hidden). These attributes are used by a wide variety software to protect and classify files. [cite web |url=http://www.xxcopy.com/xxcopy06.htm |title=XXCOPY Technical Bulletin #06 |accessdate=2007-08-02 |last=Yabumoto |first=Kan |date=2000-01-17]Many users regularly encounter the read-only attribute, which will prevent most software from allowing the user to overwrite or append to a file. Software can be designed to override this option, often after receiving confirmation from the user. The archive attribute is used by various backup and file copy programs as a hint as to whether a file needs to be backed up. [cite web |url=http://www.pcmag.com/encyclopedia_term/0,2542,t=DOS+Attrib&i=41730,00.asp |title=DOS Attrib |accessdate=2007-08-02 |work=Encyclopedia |publisher=PC Magazine ] The hidden attribute makes affected files invisible in many programs, although a variety of software, especially software designed for listing, viewing, and searching files, allows hidden files to be made visible, often with a notation that they have been designated as hidden. The system attribute is used to designate certain operating system files and affects the operation of most software less than the other attributes.
Particularities
In certain versions, when both the s and h attributes are set, they can only be removed at the same time. To remove only one, they must both be removed at the same time, and then the desired attribute must be set.
Undocumented features
If a comma is typed directly after the command's name (for example,
attrib, *.txt
), all attributes will be removed from the targeted files (in this case, all .txt files in the folder). In most versions, if a target isn't specified, then all attributes will be removed from the folder currently being browsed in DOS.References
See also
*
MS-Windows NT filesystem ACL control utilitycacls
*
Unix/Linux equivalentchattr
*List of DOS commands
Wikimedia Foundation. 2010.