Linux/date

From Omnia
Jump to navigation Jump to search

Unix Timestamp:

# %s     seconds since 1970-01-01 00:00:00 UTC
date +%s
date +%u   # %u - day of week (1..7); 1 is Monday
date +%w   # %w - day of week (0..6); 0 is Sunday
date +%Y-%m-%d-%H-%M-%S  # 2016-06-18-07-59-40
date +%Y%m%d%H%M%S  # 20160618075940

keywords