5.6. Working with Other Useful Commands

The rest of the utilities in this chapter defy easy classification. Although they serve a wide range of functions, they are all important in your computer's usage.

5.6.1. attrib.exe

All files have four basic attributes:

  • a: Archive. Files that have been modified.

  • h: Hidden. Are not usually visible.

  • r: Read-only. Cannot normally be deleted, nor can they be modified.

  • s: System. Have special file protection so that you may not delete or modify them.

    The archive attribute is used by some backup utilities to identify changed files for incremental backups.

The attrib command allows you to change these attributes. The attributes are added or removed from files by specifying the attribute with a + or - character in front of the filename, as in the following statement:

attrib -s -h +a +r c:\*.sys

The preceding statement removes the system (s) and hidden (h) attributes while adding the archive (a) and read-only (r) attributes. Adding /s to the end of the line would apply the same attributes to all the files in the subdirectories as well.

5.6.2. diskpart.exe

To manage disk partitioning, if the need ever arises, Windows 2000 and newer Windows OSes use the Disk Management graphical disk partitioning tool. Windows XP and newer Windows OSes also use another command line tool: diskpart.exe. Although this tool is capable of all disk partitioning tasks, you ...

Get CompTIA A+® Certification All-In-One For Dummies®, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.