Change mode (chmod)

What is change mode (chmod)?
Change mode (chmod) is a Unix operating system command used by administrators and programmers to set or change access permissions to a file or directory. These settings determine the access level for the specified file or directory.

The chmod command was first used in ATT Unix 1 and is still used today by Unix-like operating systems. It is also available as a C library function in Unix.

The syntax for change mode is as follows:

chmod [OPTIONS]… MODE [, MODE]… FILENAME1 [, FILENAME2]…
chmod [OPTION]… OCTAL MODE FILENAME1 [, FILENAME2]…
chmod [OPTION]… [REFERENCE] [OPERATOR] [MODES] FILENAME1 [, FILENAME2] ..

The chmod command has the following options:

-R, –recursive: Changes the directories and files recursively
-v, –verbose: Display a diagnostic report for each file processed
-c, –changes: As detailed, but only for actual changes
-f, –silent: suppress error messages
–Reference = RFILE: Use RFILE mode instead of MODE values

Permissions are granted as follows: a: All
o: Others
g: group
r: Read
u: user
w: Write
x: Run or run as a program

Was the explanation to "Change mode (chmod)"Helpful? Rate now:

Weitere Erklärungen zu Anfangsbuchstabe C