mattrib(1) — Commands
NAME
mattrib − mtools utility to change DOS file attribute flags
SYNOPSIS
mattrib [-a|+a] [-h|+h] [-r|+r] [-s|+s] msdosfile [msdosfiles...]
The mattrib command sets (+) or clears (-) the attribute flags of a DOS file.
FLAGS
-a|+aSets or resets the archive bit. Some backup programs use this flag to indicate a new file.
-h|+hSets or resets the hidden-bit. This flag hides files from the DOS DIR command. To view these files, use the mdir command.
-r|+rSets or resets the read-only bit. This flag is used to indicate a read-only file. If this bit is set, a file cannot be removed using the DOS DEL command. To remove the file, use the mdel command.
-s|+sSets or resets the system bit. This flag is used by DOS to indicate an operating system file.
DESCRIPTION
The mattrib command sets the attribute flags of a DOS file using the plus (+) operator, or clears attribute flags using the minus (-) operator. DOS pathnames that contain the ’/’ or ’\’ separator are supported. If you use the ’\’ separator or wildcards, you must enclose filenames in quotes to protect them from the shell.
The mcd command can be used to establish the device and the current working directory (relative to DOS), otherwise the default is A:\.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of mattrib:
MCWDIf set, this variable names the file that contains the name of the current mtools working directory as established by the mcd command. If this variable is not set, the file $HOME/.mcwd is used.
RESTRICTIONS
The DOS version of the attrib command does not support all of the flags listed on this reference page.
EXIT VALUES
The following exit values are returned:
0Success
>0Failure
FILES
$HOME/.mcwdContains the name of the current mtools working directory as established by the mcd command. If this file does not exist, the default mtools working directory is A:\.
/usr/bin/mtools/mattribExecutable file