Open Source Desktop Environment : BashDate

HomePage :: Categories :: PageIndex :: RecentChanges
Search this site:

date

date

date
date with optional + format
$ date +"%a %X"


filenames
this can be useful for creating filenames in batch files
#!/bin/sh
file=$(date +%y%m%d).dat
tar cvzf $file.tgz $file


file modification date (-r)
you can optionally choose ISO 8601 format with or without hours, mins and seconds
$ date --iso-8601 -r x.x
2008-04-07

$ date --iso-8601=minutes -r x.x
2008-04-07T10:02+0100

$ date --iso-8601=seconds -r x.x
2008-04-07T10:02:56+0100



REFERRERS
ShellCommands

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0187 seconds