#!/bin/sh if [ $# -eq 0 ]; then currentFile=$(basename "$0") echo "Usage: ./$currentFile 'yyyy-mm-dd HH:MM:SS'" exit 0 fi date -s "$1" # set the hwclock from the system time hwclock -w