p4 list


Create a temporary list of files that can be used as a label.


p4 [g-opts] list [ -l labelname ] [ -C clientworkspace ] [ -M ] file[revRange]...
p4 [g-opts] list -l labelname -d [ -M ]


This command is intended for use by systems integrators and third-party developers.

p4 list builds an in-memory temporary list of files that can be used as a label for the duration of the single p4 command session that created it. The list exists only as long as the connected session; the temporary list created by running p4 list from the command line is not available to subsequent p4 commands.

By default, the head revision is listed. If the file argument specifies a revision, all files at that revision are listed. If the file argument specifies a revision range, the highest revision in the range is used for each file.

The -d option is handy for long-running processes that need to use and reuse lists within the scope of one session without exhausting the server's process memory.


-l labelname

Specify the label to be applied to file revisions. If a label of that name already exists, the in-memory name has precedence over the stored one. If you do not use this option, the p4 list command assigns a unique name to the temporary list and returns the name as output.

-C clientworkspace

List only the files mapped through the specified clientworkspace.


When run against a forwarding replica, forward the p4 list command to the master server.

-d labelname

Delete the specified list.


See the “Global Options” section.

Usage Notes

Can File Arguments Use Revision Specifier?

Can File Arguments Use Revision Range?

Minimal Access Level Required