Isilon:如何使用 dd 命令建立測試檔案
Summary: 本文件說明如何使用「dd」Direct Disk Utility 建立測試檔案。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
簡介
如何使用 UNIX「direct disk」公用程式的「dd」命令 快速建立特定大小的測試檔案如需更多有關 dd 命令及其選項的資訊,請從命令列執行下列命令以檢視其手冊:
man dd
程序
- 在叢集的任何節點上開啟 SSH 連線,然後使用「root」帳戶登入。
- 通過運行以下命令創建 100MB 零填充檔。這對於創建內容不重要的大檔很有用。
dd if=/dev/zero of=zero-padded.bin bs=1024 count=102400
- 通過運行以下命令創建 100MB 的隨機數據檔。這對於創建數據不同的多個檔非常有用(例如,在測試檢查檔差異的實用程式時):
dd if=/dev/urandom of=random-data.bin bs=104857600 count=1
- 通過運行以下命令創建一個不佔用磁碟空間的 100MB 稀疏檔。這對於調整二進位圖像檔的大小而不覆蓋它們很有用。
dd if=/dev/zero of=sparse-file.bin bs=1 count=0 seek=104857600
然後驗證稀疏文件的實際大小和表觀大小。
- 執行下列命令,確認稀疏檔案的實際大小:
du -A sparse-file.bin
將顯示類似於以下內容的輸出,指示檔在磁碟上使用 0MB 空間:
0 sparse-file.bin - 執行下列命令,確認稀疏檔案的表觀大小:
ls -lh sparse-file.bin
將顯示類似於以下內容的輸出,指示該檔似乎佔用了磁碟上的 100MB 空間:-rw------- 1 root wheel 100M Jul 1 20:35 sparse-file.bin
- 執行下列命令,確認稀疏檔案的實際大小:
Additional Information
必要工具或技能
本文中的程序需要熟悉 OneFS 作業系統和 UNIX 命令,並熟悉從命令行介面執行命令。
Affected Products
IsilonArticle Properties
Article Number: 000022920
Article Type: How To
Last Modified: 02 July 2025
Version: 4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.