Use p4 opened to list files that are currently open via p4 add, p4 edit, 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, or to show open files in all pending changelists, and to limit the number of files displayed.If file specifications are provided as arguments to p4 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 (add, edit, delete, or integrate), and the type of the file. The output for each file looks like this:
• depot-file is the path in depot syntax;
• rev is the revision number;
•
• chnum is the number of the submitting changelist; and
•
-c changelist# List the files in pending changelist changelist#. To list files in the default changelist, use p4 opened -c default. -C workspace -m max List only the first max open files. See the Global Options section.
Can File Arguments Use
Revision Specifier? Can File Arguments Use
Revision Range? Minimal Access Level Required
• Perforce does not prevent users from opening already open files; its default scheme is to allow 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 opened with an indication of *locked*. On UNIX, you can find all locked files you have open with the following command:
List all files in pending changelist 35 that lie under the depot's main subdirectory. List all opened files in the default changelists for all clients.