---
name: "xfs_protofile"
section: "8"
platform: "linux"
package: "xfsprogs"
version: "7.2.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/xfs_protofile"
---

# xfs\_protofile(8)

create a protofile for use with mkfs.xfs

## NAME

xfs\_protofile - create a protofile for use with mkfs.xfs

## SYNOPSIS

**xfs\_protofile** *path* \[ *paths...* \]\
 **xfs\_protofile -V**

## DESCRIPTION

**xfs\_protofile** walks a directory tree to generate a protofile. The protofile format is specified in the [**mkfs.xfs**(8)](/mkfs.xfs/8.md) manual page and is derived from 3rd edition Unix.

## OPTIONS

- *path*

  Create protofile directives to copy this path into the root directory. If the path is a directory, protofile directives will be emitted to replicate the entire subtree as a subtree of the root directory. If the path is a not a directory, protofile directives will be emitted to create the file as an entry in the root directory. The first path must resolve to a directory.

## BUGS

Filenames cannot contain spaces. Extended attributes are not copied into the filesystem.
