Monday, November 13, 2006

Getting date to use in a filename

The default output of "date" command isn't suitable to be used in filenames. So when you need to use date in a filename, you need to pass formatting options.

Some formatting options

$ date '+%m%d%y'
111306



$ date '+%H%M%S'
202928


$ date '+%m%d%y%H%M%S'
111306203011

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home