TotalNET Advanced Server 5.2 Reference Manual

tnchgrp

This command sets the group ID of a file or a directory to a specified group and changes the TAS shadow file group ID information to reflect the new ID. For more information, refer to the UNIX chgrp man page. Only the owner and the superuser may change the group of a file or a directory, and the owner can only change the group to a group in which owner belongs.

Location

TNHOME/usr/bin

Usage

tnchgrp [-f] [-i] [-R] group {file...|dir...}

Options

-f

Prevent this command from printing error messages even when the operation fails to change the group. 

-i

Prompt for confirmation before changing the group for a file or directory. 

-R

Change the group of a directory and every file and directory under that directory to the specified group, and change the shadow file information on each affected file and directory. 

group

Specify a group name from the group database, or a numeric group ID, to give each file named by a file operand. If a numeric group operand exists as a group name in the group database, this command uses the group ID number associated with that name as the group ID. 

file

Specify the path name of the file whose group ID you want to modify. 

dir

Specify the path name of the directory whose group ID you want to modify. 

Examples

  1. Use the following command to change the group of the file word.doc to the group tech:


    tnchgrp tech word.doc
  2. Use the following command to change the group of the files template.doc and diction.doc, and the directory publish, to the group ID 269:


    tnchgrp 269 template.doc diction.doc publish
  3. Use the following command to change the group of the file sample.ppt to the group marketing without receiving any error messages even if the command fails:


    tnchgrp -f marketing sample.ppt
  4. Use the following command to change the group of the file logo.gif to the group marketing and prompt for confirmation:


    tnchgrp -i marketing logo.gif
  5. Use the following command to change the group of the directory FrameMaker and all files and directories under it to the group document:


    tnchgrp -R document FrameMaker