unbox/utils.sh
2020-01-31 11:16:17 +01:00

15 lines
238 B
Bash
Executable file

#!/bin/bash
function prefix_time(){
while read LINE; do
echo "["$(date)"] "$LINE
done
}
function mem_size(){
echo $(($(cat /proc/meminfo | grep MemTotal | awk '{print $2}')*1024))
}
function dev_size(){
blockdev --getsize64 $1
}