Saturday, July 14, 2012

How to create a new file with current date stamp?

 Use `date '+%Y%m%d%H%M'` to add date stamp to a file.

Example:

#touch file.`date '+%Y%m%d%H%M'`

will give the output as 

file.201207140947