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