From 72c5bdfd6dfcb629b71e89dffa0f576270f0ad28 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 5 Aug 2019 09:43:26 +0200 Subject: show elapsed seconds instead of current time --- kamikaze-fsck | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kamikaze-fsck b/kamikaze-fsck index 6ab7dd6..dd62d15 100755 --- a/kamikaze-fsck +++ b/kamikaze-fsck @@ -53,11 +53,11 @@ while [ -f "${tmp_dir}/faulty-inode" ]; do printf 'clri <%s>\n' "${faulty_inode}" \ >> "${tmp_dir}/faulty-inode" - >&2 date + start=$(date +%s) pkill -xf "e2fsck -f -y $1 -E no_optimize_extents,fixes_only -C 0" while pgrep -xf "e2fsck -f -y $1 -E no_optimize_extents,fixes_only -C 0"; do sleep 1 - >&2 date + >&2 echo $(($(date+%s)-start)) done break fi -- cgit v1.2.3-70-g09d2