Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2026.1

# p4 list

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

## Syntax

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

Syntax and naming conventions

## Description

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.

## Options

Option | Description
--- | ---
`-C` | 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.
`-M` | When run against a forwarding replica, forward the `p4 list` command to the target server The immediately upstream server for replica servers, edge servers, standby servers, proxies and brokers. See also 'upstream server' and 'central server'..
`g-opts` | See Global options.

## Usage notes

Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required
--- | --- | ---
Yes | Yes | `open`

Your search for returned results