/usr/lib/radare/bin/move is in radare-common 1:1.5.2-6.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | #!/bin/sh
#
# Move large ammount of bytes
#
# Thanks esteve! ;)
#
# TODO: Create destination file if it does not exists
# TODO: Truncate file if already exists?
# TODO: Do not use bs=1 (too slooow)
#
# --pancake
#
A="$1"
Aseek=$2
B="$3"
Bseek=$4
Len=$5
[ -z "$Bseek" ] && A="-h"
[ -z "$A" ] && A="-h"
if [ "$A" = "-h" ]; then
echo "Usage: rsc move [src-file] [seek] [dst-file] [seek] [[length]]"
exit 1
fi
[ "`echo $Aseek | grep 0x`" ] && Aseek=`rax $Aseek`
[ "`echo $Bseek | grep 0x`" ] && Bseek=`rax $Bseek`
chk() {
if [ ! -e "$2" ]; then
echo "$1 file not found.";
exit 1
fi
}
chk "source" "$A"
chk "destination" "$B"
B2="$B"
if [ "$A" = "$B" ]; then
B2=`mktemp`
cp $B $B2
fi
Count=""; [ -n "$Len" ] && Count="count=${Len}"
dd "if=${A}" "of=${B2}" bs=1 skip=${Aseek} seek=${Bseek} ${Count} conv=notrunc
[ "$A" = "$B" ] && mv $B2 $B
|