mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-10 23:41:22 +00:00
Correct potential errors
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#检查目录剩余空间——$1:目标路径 $2:-h参数
|
||||
dir_avail() {
|
||||
df -h >/dev/null 2>&1 && h="$2"
|
||||
df -P $h "${1:-.}" 2>/dev/null | awk 'NR==2 {print $(NF-2)}'
|
||||
}
|
||||
df -P $h "${1:-.}" 2>/dev/null | awk 'NR==2 {print $4}'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user