ArticleslgStudy

science

ATTRIB

ATTRIB is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand ATTRIB rather than just read about it. In short: In computing, ATTRIB is a command in Intel ISIS-II, DOS, IBM OS/2, Microsoft Windows and ReactOS 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.

ATTRIB — main illustration
ATTRIB — illustration

Key takeaways

  • ATTRIB belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect ATTRIB to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of ATTRIB from memory before moving on to harder problems.

Reference excerpt

In computing, ATTRIB is a command in Intel ISIS-II, DOS, IBM OS/2, Microsoft Windows and ReactOS 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.

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). However, initial releases of the operating system did not provide user-level method for reading or changing these values. 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. Subsequent versions allowed the read-only, hidden, system and archive bits to be set. MS-DOS version 3.3 added the capability of recursive searching through subdirectories to display attributes of specified files. Digital Research DR DOS 6.0 and Datalight ROM-DOS also include an implementation of the ATTRIB command. The FreeDOS version was developed by Phil Brutsche and is licensed under the GPLv2.

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

See also chattr, the equivalent on Unix and Linux cacls, the Windows NT access control list (ACL) utility List of DOS commands

References

Further reading Cooper, Jim (2001). Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. ISBN 978-0789725738. Dyson, Peter (1995). Mastering OS/2 Warp. Sybex. ISBN 978-0782116632. John Paul Mueller (2007). Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000. John Wiley & Sons. ISBN 978-0470165799.

External links

attrib | Microsoft Docs Microsoft DOS ATTRIB command

Illustrations

ATTRIB illustration

Worked examples

Example 1 — a first encounter with ATTRIB

Start with the simplest possible case. Write down what ATTRIB claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to ATTRIB before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about ATTRIB ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of ATTRIB

In research
ATTRIB appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses ATTRIB in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
ATTRIB is common in secondary-school and first-year university syllabi. It links to neighbouring topics External DOS commands, MSX-DOS commands, OS/2 commands, so understanding it makes those chapters shorter.
In everyday life
Look for ATTRIB outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “ATTRIB” →

How to study ATTRIB in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what ATTRIB means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain ATTRIB out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is ATTRIB in simple terms?

In computing, ATTRIB is a command in Intel ISIS-II, DOS, IBM OS/2, Microsoft Windows and ReactOS 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.

Why does ATTRIB matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study ATTRIB?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on ATTRIB.

Tags

  • External DOS commands
  • MSX-DOS commands
  • OS/2 commands
  • ReactOS commands
  • Windows commands

Keep exploring