> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/zfs/shou-ce-ye/xi-tong-guan-li-ming-ling-system-administration-8/zfs-project.8.md).

# zfs-project(8)

## 名称

`zfs-project` — 管理 ZFS 文件系统中的项目

## 概述

```sh
zfs project [-d|-r] 文件|目录…
```

```sh
zfs project -C [-kr] 文件|目录…
```

```sh
zfs project -c [-0] [-d|-r] [-p id] 文件|目录…
```

```sh
zfs project [-p id] [-rs] 文件|目录…
```

## 说明

### `zfs project [-d|-r] file|directory …`

列出文件和目录的项目标识符（ID）与继承标志。

#### `-d`

显示目录自身的项目 ID 和继承标志，而不显示其子项的。

#### `-r`

递归列出子目录。

### `zfs project -C [-kr] file|directory …`

清除文件和目录上的项目继承标志和/或项目 ID。

#### `-k`

保持项目 ID 不变。若未指定，项目 ID 将重置为零。

#### `-r`

递归清除子目录的标志。

### `zfs project -c [-0] [-d|-r] [-p id] file|directory …`

检查文件和目录上的项目 ID 与继承标志，报告没有项目继承标志、或项目 ID 与目标目录的项目 ID 或 `-p` 指定的 ID 不一致的条目。

#### `-0`

用 NUL 字节而不是换行符分隔文件名，且不输出诊断信息。

#### `-d`

检查目录自身的项目 ID 和继承标志，而不检查其子项的。

#### `-p id`

与 `id` 比较，而不是与目标文件和目录各自的项目 ID 比较。

#### `-r`

递归检查子目录。

### `zfs project [-p id] [-rs] file|directory …`

在文件和目录上设置项目 ID 和/或继承标志。

#### `-p id`

将项目 ID 设为给定值。

#### `-r`

递归应用到子目录。

#### `-s`

在给定的文件和目录上设置项目继承标志。这通常与 `-r` 配合使用来设置目录树配额。此时，除非用 `-p` 显式指定，目录的项目 ID 会设置给它的所有后代。

## 参考文献

zfs-projectspace(8)

2022 年 7 月 11 日


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://book.bsdcn.org/zfs/shou-ce-ye/xi-tong-guan-li-ming-ling-system-administration-8/zfs-project.8.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
