Wednesday, August 29, 2007

Date Command in Debian Linux

Here are some interesting uses of the date command in Debian Linux by Mary M. Chaddock, GSEC, GCUX. She is a Network Security Administrator for Abilene Christian University in Texas. Thanks Mary for the nice email, and of course, the Debian date tip.

Mary said, "Specifically, I often have a need to convert log dates or search logs for specific dates when the log date is in epoch format."

Displays the current date
'date +%s'

Gives date two weeks ago
'date +%s --date=-2week'

Converts an epoch timestamp
'date --date=@1187103930'

1 comment:

Mitesh Asher said...

Could not find viraltag post on your blog so posting comment here.
I have added u in my viral tag.
http://humor-in-photos-and-pictures.blogspot.com/2007/08/viraltag-link-exchange-program.html

Pls add me as 'Humor Pictures'
http://humor-in-photos-and-pictures.blogspot.com