It is easy to change the user group of a file. use chgrp directly. This command is the abbreviation of changegroup (change user group. This makes it easy to remember. However, remember that the name of the user group to be changed must exist in/etc/group. Otherwise, an error is displayed. Assume that you have logged on to FC4 as the root user, so there is an install. log file in your home directory. how can you change the user group of this file? Suppose you already know that there is
It is easy to change the user group of a file. use chgrp directly. This command is short for change group. This makes it easy to remember. However, remember that the name of the user group to be changed must exist in/etc/group. Otherwise, an error is displayed. Assume that you have logged on to FC4 as the root user, so there is an install. log file in your home directory. how can you change the user group of this file? Suppose you already know that there is a user group named users in/etc/group, but the user group name testing does not exist in/etc/group, what happens when the user group is changed to users and testing? [Root @ linux ~] # Chgrp [-R] dirname/filename... parameter:-R: implements recursive (recursive) changes, that is, all files and directories under the subdirectory are updated to the user group. It is often used to change a directory. Example: [root @ linux ~] # Chgrp users install. log [root @ linux ~] # Ls-l-rw-r -- 1 root users 68495 Jun 25 install. log [root @ linux ~] # Chgrp testing install. logchgrp: invalid group name 'testing' <= error message ~ The user group name cannot be found ~