# sum

计算文件的校验码和显示块数

## 补充说明

**sum命令** 用于计算并显示指定文件的校验和与文件所占用的磁盘块数。

### 语法

```
sum(选项)(参数)
```

### 选项

```
-r：使用BSD的校验和算法，块大小为1k；
-s：使用system V的校验和算法，块大小为512字节。
```

### 参数

文件列表：需要计算和与磁盘块数的文件列表。

### 实例

计算文件校验码：

```
[root@localhost ~]# sum insert.sql
00827    12
```


---

# 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/sum.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.
