Linux mattrib Command
-- Learning not just skills, but dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
Linux Tutorial
Linux Tutorial Linux Introduction Linux Installation Linux Cloud Server WSL Install Linux Linux System Boot Process Linux System Directory Structure Linux Forgot Password Solution Linux Remote Login Linux File Basic Attributes Linux File and Directory Management Linux User and User Group Management Linux Disk Management Linux vi/vim Linux yum command Linux apt command
Shell Tutorial
Shell Tutorial Shell Variables Shell Passing Arguments Shell Arrays Shell Operators Shell echo command Shell printf command Shell test command Shell Flow Control Shell Functions Shell Input/Output Redirection Shell File Inclusion
Linux Reference Manual
Linux Command Manual Nginx Installation and Configuration MySQL Installation and Configuration Linux Quiz
Nginx Installation and Configuration
Deep Dive
- Programming Languages
- Network Design and Development
- Scripting Languages
- Programming
- Network Services
- Software
- Development Tools
- Web Service
- Scripts
- Computer Science
Linux mattrib Command
The Linux mattrib command is used to change or display the attributes of MS-DOS files.
mattrib is a command from the mtools package, simulating the MS-DOS attrib command, and can change the attributes of MS-DOS files.
Syntax
mattrib [-a|+a] [-h|+h] [-r|+r] [-s|+s] [-/] msdosfile [ msdosfiles ... ]
Parameters:
-a/+aRemove/Set the archive attribute.-h/+hRemove/Set the hidden attribute.-r/+rRemove/Set the read-only attribute.-s/+sRemove/Set the system attribute.-/Process recursively, including files in all subdirectories.-XOutput results in a shorter format.
Examples
List the attributes of all files on an MS-DOS format floppy disk in drive A.
mattrib a:
Remove the hidden, system, and read-only attributes of the file msdos.sys on the floppy 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 floppy disk in drive A.
mattrib -r -/ a:*.*
YouTip