How to append current date and timestamp to filename in shell script - Linux FAQ
To include current time in second precision: now=$(date +"%Y-%m-%d-%S") filename="my_program.$now.log" # example filename: my_program.2012-01-23-47.log To include current timestamp in nanosecond precision: now=$(date +"%Y.%m.%d.%S.%N ...
xmodulo.com |