15JanJanuary 15, 2018 Record server uptime in text file zalam2018-01-15T18:47:26+05:00 Create a shell script and execute that shell script. TODAY=$(date +"%T") SCRIPT=$(uptime | awk '{print $(NF-2)" "$(NF-1)" "$(NF-0)}') echo "$TODAY | $SCRIPT" >> /root/script/out.txt Share this post Facebook Twitter LinkedIn Google + Email