p4 groups

List groups of users.

Syntax

p4 [g-opts] groups [-m max] [-v] [group]
p4 [g-opts] groups [-m max] [-i [-v]] user | group
p4 [g-opts] groups [-m max] [-g | -u | -o] name

Syntax conventions

Description

The p4 groups command shows a list, in alphabetical order, of all current group names.

The p4 groups user commands show the groups containing that user.

The p4 groups group command lists the groups for which group is a subgroup. (See the subgroup field of the p4 group form.)

The -i option with a user argument shows all the groups the user belongs to, including by membership in a subgroup.

The -i option with a group argument is equivalent to the p4 groups group command.

The -m max option limits the output to the first max groups.

The p4 -ztag groups displays tagged output, which includes the Description field, among other fields of p4 group.

MaxLimit fields

The "MaxLimit" fields are MaxResults, MaxScanRows, MaxLockTime, MaxOpenFiles, MaxMemory, and Timeout.

  • To display the values for the "MaxLimit" fields, use p4 groups -v for all groups, or p4 groups -v groupname for the specified group.
  • For the list of commands that are affected by any the "MaxLimit" fields, see the output of the p4 help maxresults command.

Options

-g name

Indicates that the name argument is a group rather than a user.

-i

Display groups to which the user or group is a member, including an indirect member by means of inclusion in a subgroup.

-m max

List only the first max groups.

-o name

List groups owned by the named user.

-u name

List groups for whom the specified user is a member.

-v

Display verbose output that includes the values of MaxResults, MaxScanRows, MaxLockTime, MaxOpenFiles, MaxMemory, Timeout, and PasswordTimeout

g-opts

See Global options.

Use p4 -ztag groups to get tagged output that includes the group Description field, among other fields of p4 group.

Usage Notes

Can File Arguments Use Revision Specifier? Can File Arguments Use Revision Range? Minimal Access Level Required

N/A

N/A

list

  • To see all the members of a particular group, use p4 group-o groupname. This variation of p4 group requires only list access.
  • The command returns no output if there is no object to report on.

Examples

Command Description Example Output

p4 groups maria

Display the names of all groups of which user maria is a member.

italy
p4 groups italy List the groups for which italy is a subgroup.
southern-europe

p4 groups -i maria

Display the names of all groups of which user maria is a member, including by membership in a subgroup.

southern-europe
italy

Related Commands

To create or edit an existing group of users

p4 group

To view a list of all the members and specifications of a particular group

p4 group-o groupname

To set Helix Server access levels for the members of a particular group

p4 protect