From 7099c6bb70cbc3596b685987790bc9be43575dda Mon Sep 17 00:00:00 2001 From: adminroot Date: Tue, 4 Nov 2025 08:22:43 -0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20src/alias.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/alias.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/alias.txt b/src/alias.txt index 5450dcc..d541fae 100644 --- a/src/alias.txt +++ b/src/alias.txt @@ -191,6 +191,18 @@ alias nn='micro' alias nnd='micro compose.yml' alias dush='du -sh' +function wdt() { + echo "输入测速文件大小(MB) [默认: 2048]: " + read -t 30 -p "> " testfile_size + if [ $? -ne 0 ] || [ -z "$testfile_size" ]; then + testfile_size=2048 + echo -e "\n使用默认值: ${testfile_size}MB" + fi + time dd if=/dev/zero of=./testfile bs=1M count=${testfile_size} oflag=direct + time dd if=./testfile of=/dev/null bs=1M + rm ./testfile +} + function din() { docker exec -it "$1" /bin/sh }