# lsattr

查看文件的第二扩展文件系统属性

## 补充说明

**lsattr命令** 用于查看文件的第二扩展文件系统属性。

### 语法

```
lsattr(选项)(参数)
```

### 选项

```
-E：可显示设备属性的当前值，但这个当前值是从用户设备数据库中获得的，而不是从设备直接获得的。
-D：显示属性的名称，属性的默认值，描述和用户是否可以修改属性值的标志。
-R：递归的操作方式；
-V：显示指令的版本信息；
-a：列出目录中的所有文件，包括隐藏文件。
```

lsattr经常使用的几个选项-D，-E，-R这三个选项不可以一起使用，它们是互斥的，经常使用的还有-l,-H，使用lsattr时，必须指出具体的设备名，用-l选项指出要显示设备的逻辑名称，否则要用-c，-s，-t等选项唯一的确定某个已存在的设备。

### 参数

文件：指定显示文件系统属性的文件名。

### 实例

```
lsattr -E -l rmt0 -H
lsattr -EO -l rmt0
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hezhiqiang.gitbook.io/linux/ming-ling/lsattr.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
