r/ScriptSwap • • Mar 02 '12

datestamp

Script to print a datestamp (the current date time in the format 201203012109)

Typical use:

mv somefile somefile.bak.`datestamp`

Script

#!/bin/sh
date +'%G%m%d%H%M'
5 Upvotes

5 comments sorted by