Displaying file locations

To display information about the locations of files, use the p4 where, p4 have, and p4 sync -n commands:

  • To display the location of a file in depot, client, and local syntax, issue the p4 where command.
  • To list the location and revisions of files that you last synced to your client workspace, issue the p4 have command.
  • To see where files will be synced in your workspace, preview the sync by issuing the p4 sync -n command.

You can use these commands with or without filespec arguments.

The following table lists some useful location reporting commands:

To display Use this command

The revision number of a file that you synced to your workspace

p4 have filespec

How a particular file in the depot maps to your workspace

p4 where //depot/filespec