p4 list

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


p4 [g-opts] list [-l labelname] [-C -M] FileSpec[revSpec]
p4 [g-opts] list -l labelname -d [-M]

Syntax conventions


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.



Limits any depot paths to those that can be mapped through the client workspace.

-d labelname

Delete the specified list.

-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.


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


See Global options.

Usage Notes

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