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

P4 CLI Documentation | 2025.2

# p4 hotfiles

Edit the hotfiles mapping table for altsync client workspaces.

## Syntax

    p4 hotfiles
    p4 hotfiles -o
    p4 hotfiles -i

Syntax and naming conventions

## Description

A client workspace has the option being either `altsync` or `noaltsync`. (See Options in p4 client.) This option applies to all the files of the client workspace. To learn more, see P4ALTSYNC and Introducing P4VFS in the P4 Virtual File Service (P4 VFS) Documentation.

The `p4 hotfiles` command offers a way to fine tune an `altsync` client workspace so that certain files get sync'd rather than getting placeholders. Commands, such as p4 sync, that could create placeholders with an altsync agent, do not create placeholders for the files that match the mappings created by the `p4 hotfiles` command.

Placeholders can make the initial sync operation much faster. However, you might want certain files to not have placeholders in the following situations:

- Your work is focused on certain files that you want in your workspace as soon as possible when you sync.

- Certain files are so small that placeholders provide no benefit.

Because the hotfiles are exceptions to altsync, the hotfiles can also benefit from the Delta Transfer feature described at Delta Transfer of large binary files in the P4 Server Administration Documentation.

The hotfiles feature requires a 2024.2 server (or later) and a 2024.2 client (or later).

### Rules for hotfiles

The hotfiles form has a single field, `HotFiles:`, followed by any number of lines. Each line contains a depot file path pattern, followed by an optional rule. The rule can specify a filetype, a size, or both filetype and size. Paths can be repeated for different filetypes. See the Examples.

The altsync agent can specify additional mappings that are added to the hotfiles mappings. If the altsync agent specifies a rule with an exclusionary mapping that conflicts with a `p4 hotfiles` rule, the `p4 hotfiles` rule is overridden.

### Limitation

To ensure p4ignore rules are obeyed on an altsync client, add p4ignore files to the hotfile spec. The default p4ignore files, `p4ignore.txt` and `.p4ignore` can be made hotfiles in the HotFiles spec. For example,

Copy

    HotFiles:
        //depot/p4ignore.txt
        //depot/.p4ignore
        //depot/.../p4ignore.txt
        //depot/.../.p4ignore

If a custom p4ignore filename is set up by using `p4 set P4IGNORE=filename`, use that name instead of the default names.

## Form fields

Field Name | Type | Description
--- | --- | ---
`Path:` | Writable | The depot name as provided in `p4 depot depotname`. Be aware of the Limitations on characters in filenames and entities.
`Filetype:` | Writable | Any valid filetype. To learn more, see Base file types and modifiers.
`Size:` | Writable | `<` or `>` followed by numeric value in bytes, followed by an optional unit specifier, which can be `K`, `M`, `G`, or `T`. For example, `<5K` means less than five kilobytes.

## Options

Option | Description
--- | ---
`-o` | Writes the hotfiles table to standard output. The user's editor is not invoked.
`-i` | Reads the hotfiles table from standard input. The user's editor is not invoked.
`g-opts` | See Global options.

## Usage notes

Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required
--- | --- | ---
N/A | N/A | `admin`

## Examples

Copy

    HotFiles:
        //depot/project1/...
        //depot/project2/... text
        //depot/project3/... &lt;50K
        //depot/project4/... text+C &lt;100K
        //depot/project4/... binary &lt;1M

Your search for returned results