Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux mattrib Command

Linux mattrib Command

Linux Command Reference Linux Command Reference

The Linux mattrib command is used to change or display the attributes of MS-DOS files.

mattrib is an mtools utility command that emulates the MS-DOS attrib command and can change the attributes of MS-DOS files.

Syntax

mattrib [-a|+a] [-h|+h] [-r|+r] [-s|+s] [-/] [-X] msdosfile [ msdosfiles ... ]

Parameters:

Example

List the attributes of all files on the MSDOS-formatted disk in drive A.

mattrib a: 

Remove the hidden, system, and read-only attributes of msdos.sys on the disk in drive A.

mattrib -h -s -r a:msdos.sys

Remove the read-only attribute from all files, including those in subdirectories, on the disk in drive A.

mattrib -r -/ a:*.*

Linux Command Reference Linux Command Reference