List files that are open in pending changelists.
p4 [g-opts] opened [-a -c change] [-C workspace] [-u user -m max -s -g] [file ...]
p4 [g-opts] opened [-a -x] [-m max] [file ...]
This command also works with openable stream specifications. See -So in Options.
p4 opened to list files that are currently open
p4 delete, or
p4 integrate. By
default, all open files in the current client workspace are listed. You
can use command line arguments to list only those files in a particular
pending changelist, to show open files in all pending changelists, to
limit the number of files displayed, or to limit the files opened for a
If file specifications are provided as arguments to
opened, only those files that match the file
specifications are included in the report.
The information displayed for each opened file includes the file’s name,
its location in the depot, the revision number that the file was last
synced to, the number of the changelist under which the file was opened,
the operation it is opened for (
archive), and the type of the file.
The output for each file looks like this:
depot-file#rev - actionchnum change (type) [lock-status]
- depot-file is the path in depot syntax
- rev is the revision number
- action is the operation the file was open for:
branch, or integrate
- chnum is the number of the submitting changelist
- type is the type of the file at the given revision.
- If the file is locked (see
p4 lock), a warning that it is
*locked*appears at the line’s end
- Files with filetypes that use the
+lmodifier are exclusively-locked (see the example for
p4 typemap) and are displayed with a lock status of
You can use the
-s option to provide shortened output that
# number and the
type) of the file. This form of the command
typically runs faster than the default.
-u option limits output to files opened by a particular
user. Otherwise, the command applies to all users.
-g option lists files that are opened on a commit
server in a multi-server installation.
The following examples show how user details are included in command output. In the following, information is about the current workspace and the current user is not identified. However, other users with files opened are identified.
$ p4 opened //depot/file-1.txt#1 - edit default change (text) by [email protected] //depot/file-2.txt#1 - edit default change (text)
In this example, which asks for all workspaces, user names are always displayed:
$ p4 opened -a //depot/file-1.txt#1 - edit default change (text) by [email protected] //depot/file-2.txt#1 - edit default change (text) by [email protected]
List the opened files of the server on which the command is run.
List the files in pending changelist
List only files that are open in the specified client
List files that are opened on the commit server in a multi-server
installation. This allows you to track files that might be locked
globally on the commit server from an edge server. Because the
command query runs on the commit server, if you provide a file
spec argument, it must be in depot syntax. The
List only the first
Short output; do not output the revision number or file type.
This option is more efficient, particularly when using the
List only those files that were opened by
Note that this option lists files opened in any workspace for the specified user name, not just the current workspace.
In multi-server environments, list all open files that have the
|-So||Can be used with -c change to list the stream spec that is currently opened for edit. By default, if -So is omitted, the opened stream spec will be listed before the list of files. If no stream spec is opened for edit, no stream spec will be listed.|
See Global options.
|Can File Arguments Use Revision Specifier?||Can File Arguments Use Revision Range?||Minimal Access Level Required|
- Helix Server
does not prevent users from opening already open files. Instead, Helix Server, by default, allows multiple users to edit the file simultaneously, and
then resolve file conflicts with
p4 resolve. To determine whether or not another user already has a particular file opened, use
p4 opened -a file.
Locked files appear in the output of
p4 openedwith an indication of
*locked*. On UNIX, you can find all locked files you have open with the following command:
$ p4 opened | grep "*locked*"
This lists all open files you have locked with
- p4 opened -a can have a performance impact on
large sites. Unless you need the exact revision number or file type of
an opened file, the best practice is to use
p4 opened -as.
- p4 opened does not show files in shelved
changelists. To display shelved changelists, use
p4 changes -s shelved, and then use
p4 describe -s -S changelistto display the files in the selected changelist(s).
List all files in pending changelist 35 that lie under the
List all opened files in the default changelists for all client workspaces.
||List the opened files of the specified user in any workspace on the server.|