Last update Sun Mar 4 11:58:07 2018

CHMOD: Read/Write File Attributes

chmod changes or displays the attributes for a particular file.

Command syntax:

chmod {(+|-)attribute} [file...] 

file is the file or files of interest. Wildcards are accepted.

Using + before an attribute turns on the attribute. Using - turns off the attribute. The attributes are:

Chmod Attributes
attribute Description
R Read only
H Hidden
S System
V Volume label
D Subdirectory
A Archive

Example: This line makes myfile.exe a read-only file:

chmod +R myfile.exe 

If no attributes are specified, chmod displays (but does not change) the file's attributes, in this form:

__A__SHR 0x27 IO.SYS 

Mnemonic characters denote attributes that are "on"; underscored characters indicate that an attribute is "off." Thus, chmod can be handy for finding hidden and system files:

chmod *.*
Home | Runtime Library | IDDE Reference | STL | Search | Download | Forums