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

P4 CLI Documentation | 2026.1

# p4 fstat (graph)

List file info.

## Syntax

    p4 fstat [-F filter -T fields -m max] file ...

Syntax and naming conventions

## Description

For files in a depot of type `graph`, information is limited to what Git provides. For details, see the final example in the section Examples.

This command:

- lists information about files, one line per field
- is intended for use in Perforce API applications, where the output can be accessed as variables, but its output is also suitable for parsing from the client command output in scripts.

### Fields that p4 fstat displays

Field | Description
--- | ---
`depotFile` | name in depot
`clientFile` | local path (host or Perforce syntax)
`isMapped` | set if file is mapped in the client
`headCommit` | the commit for the file at head rev
`headBlob` | the sha for the file at head rev
`headType` | head rev type, if in depo
`haveBlob` | the sha for the have rev on client
`haveCommit` | the commit for the have rev on client
`otherOpen#` | list of user@client with file opened
`otherAction#` | open action, if opened by someone else
`otherChange#` | changelist, if opened by someone else
`otherLock#` | user@client with file locked
`otherOpen` | set if someone else has it open
`otherLock` | set if someone else has it locked
`repo` | the name of the repo (.git suffix)
`repoName` | the name of the repo

If the file is opened in the current workspace, additional fields are displayed:

Field | Description
--- | ---
`action` | open action, if opened
`change` | open changelist#, if opened
`type` | open type, if opened
`actionOwner` | user who opened file, if opened
`workBlob` | sha of open revision, if opened
`ourLock` | set if this user/client has it locked

## Options

Option | Description
--- | ---
`-F filter` | The -F flag lists only files satisfying the filter expression. This filter syntax is similar to the one used for `p4 jobs -e jobview` and is used to evaluate the contents of the fields in the preceding list. For example: -F "headType=binary & repoName=//repo/git" Filtering is case-sensitive. For performance reasons, filtering is not optimized with indexes.
`-m max` | Limits output to the specified number of files.
`-T fields` | List only those fields that match the field names specified by `fields`. The list of field names can be separated by spaces or commas. For example: -T "depotFile, clientFile, headCommit"

## Usage notes

Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required
--- | --- | ---
Yes | Yes | list protection, read permission

## Examples

p4 fstat //graphDepot1/repo1/... * | Each file has its own Git SHA-1 value as a binary large object (blob). Both files have the same Git commit SHA-1 because they were in the same commit.
    p4 fstat //graphDepot1/repo1/triggers.txt
    ... depotFile //graphDepot1/repo1/triggers.txt
    ... clientFile /opt/perforce/servers/17100/graph_ws/graphDepot1/repo1/triggers.txt
    ... isMapped
    ... headCommit 754462e860e40b4e9ce638fec2af308f06e90216
    ... headBlob 8539b99903d69a65caca1d67a5771ebca3d75758
    ... headType text
    ... haveBlob 8539b99903d69a65caca1d67a5771ebca3d75758
    ... haveCommit 754462e860e40b4e9ce638fec2af308f06e90216
    ... repo //graphDepot1/repo1.git
    ... repoName //graphDepot1/repo1

Your search for returned results