Change the owner group of a file/directory to match a reference file

chgrp

  • Change group ownership of files and directories.
    More information: <https://www.gnu.org/software/coreutils/chgrp>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

chgrp --reference={{path/to/reference_file}} {{path/to/file_or_directory}}

click the source code to copy install chgrp on any operating system with command-not-found.com