As I prepare for CompTIA's A+ Certification I will post my revision notes here.

Monday, February 06, 2006

The MS-DOS ATTRIB command

This DOS command displays the attributes of a file and can be used to modify attributes of files too.
A file can be set to a number of different states such as read-only, which as the name suggests only allows the file to be read NOT modified or deleted.
A file can also be set to a hidden or system so it can't be seen and deleted in Windows Explorer unless the user has specified to view hidden and system files, which is disabled by default.
The ATTRIB command also features an archive bit which when set tells any backup software installed that this file needs to be backed up because it has been modified.

The following example shows the ATTRIB command being used to make a file read-only:

C:\>attrib +r myfile.txt

This command now removes the read-only setting:

C:\>attrib -r myfile.txt

0 Comments:

Post a Comment

<< Home