shell date examples
The shell command lines below are examples to get the timestamp, iso date format as well as the date with hour, minute, and second.
[code language=”shell”]
#!/bin/bash
date +%s
date +%Y-%m-%d
date +%Y%m%d
date +%Y-%m-%d_%H:%M:%S
[/code]
output
[code language=”text”]
1419445952
2014-12-24
20141224
2014-12-24_13:32:32
[/code]
Search within Codexpedia

Custom Search
Search the entire web

Custom Search
Related Posts