Friday, July 08, 2005

date reformatting in UNIX (useful when you need to send file with timestamp)

Here is one way of reformatting the date:

date '+ %m%d%Y_ %H%M%S' to get the date in the format, 10052004_114643

The usage takes the format,
$ datetail=`date '+ %m%d%Y_%H%M%S'`
$ echo $datetail

0 Comments:

Post a Comment

<< Home