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 }