date
date
date
date with optional + format
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]