> For the complete documentation index, see [llms.txt](https://kawsing.gitbook.io/opensystem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled-4/linux-cli/pv-de-shi-yong.md).

# PV的使用

PV 全命為 Pipe Viewer ，利用它我們可以查看到命令執行的進度。

用法：pv \[OPTION] \[FILE] ...

將FILE（或標準輸入）連接到標準輸出，監督。

## **使用pv 命令監控Linux 命令的執行進度**

### **複製文件**

```
pv xxx.iso > aaa.iso
```

### **複製文件（限速2MB/s）** \*

```
pv -L 2m xxx.iso > aaa.iso
```

### &#x20;顯示ssh傳輸的network throughput

```
yes|pv|ssh 120.115.4.238 "cat > /dev/null"
```

### 顯示進度條的同時計&#x7B97;**/ etc / hosts**文件中的行數，字數和字節數，請在下面運行此命令

```
pv -p /etc/hosts | wc
```

```
tar -czf - ./Downloads/ | (pv -p --timer --rate --bytes > backup.tgz)
tar -czf - ./Documents/ | (pv -n > backup.tgz) 2>&1 | dialog --gauge "Progress" 10 70
```

從/ var / log / syslog文件製作一個zip文件，請運行以下命令

```
pv /var/log/syslog | zip > syslog.zip
```


---

# 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 dynamically by asking a question.

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

```
GET https://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled-4/linux-cli/pv-de-shi-yong.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
