asked 113k views
1 vote
Which command is used to change permissions of files and directories?

1) mv
2) chgrp
3) chmod
4) None of the above

asked
User Mmking
by
7.9k points

1 Answer

7 votes

Final answer:

The command used to change file or directory permissions is 'chmod', which stands for 'change mode'. 'mv' is for moving or renaming files, while 'chgrp' is for changing group ownership. Hence, the correct answer is option 3) chmod.

Step-by-step explanation:

The command used to change permissions of files and directories in Unix and Unix-like operating systems is chmod. This command allows users to set or modify the read, write, and execute permissions of a file or directory. The syntax generally follows the pattern: chmod [options] mode file, where 'mode' specifies the permissions to be applied and 'file' is the target file or directory. The mv command, on the other hand, is used to move or rename files and directories. The chgrp command is used to change the group ownership of a file or directory. Therefore, the correct answer is 3) chmod.

answered
User EFloh
by
8.6k points