From 5e16e006e6c6f8fe19af9cbd5a580f428b5204f9 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 4 Sep 2019 15:18:41 +0200 Subject: [PATCH] also support mounted cifs and so on --- cp_sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cp_sh b/cp_sh index f54cf6b..76226ad 100755 --- a/cp_sh +++ b/cp_sh @@ -4,7 +4,7 @@ # @version 0.2 function free_disk() { - df "$1" | grep '/dev/' | sed -r -e "s/[\t\ ]+/ /g" | cut -d ' ' -f 4 + df "$1" | tail -n1 | sed -r -e "s/[\t\ ]+/ /g" | cut -d ' ' -f 4 } md5="2cp"