From 0b8020ac1891ce859e9dad354b0db61f7be903d5 Mon Sep 17 00:00:00 2001 From: Drew Bonasera Date: Thu, 28 Apr 2016 02:10:01 -0400 Subject: [PATCH] Change parameters to cp for image copy This will speed up the copy process on some filesystems by writing less to the disk. CoW filesystems will perform the best --- pishrink.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pishrink.sh b/pishrink.sh index fb24736..d5864ae 100755 --- a/pishrink.sh +++ b/pishrink.sh @@ -26,7 +26,7 @@ fi #Copy to new file if requested if [ -n "$2" ]; then echo "Copying $1 to $2..." - cp "$1" "$2" + cp --reflink=auto --sparse=always "$1" "$2" if (( $? != 0 )); then echo "ERROR: Could not copy file..." exit -5