date time

HowTo: UNIX Set Date and Time Command

by Vivek Gite on April 26, 2011 · 3 comments

I recently noticed that one of my UNIX servers was about 4 hours behind the correct time. I wanted to correct the date and time manually. How do I set date and/or time under UNIX operating systems using command line options?

{ 3 comments }

Linux / UNIX: TZ Environment Variable

by Vivek Gite on January 29, 2011 · 0 comments

What is the correct format for a TZ (time zone) environment variable for use with the Linux or UNIX operating system?

{ 0 comments }

Bash Infinite Loop Examples

by Vivek Gite on January 20, 2011 · 2 comments

How do I write an infinite loop in Bash script under Linux or UNIX like operating systems?

{ 2 comments }

VI / VIM: Insert Current Date / Time

by Vivek Gite on November 17, 2010 · 1 comment

How do I display and insert current date and/or time under vi or VIM text editor?

{ 1 comment }

Linux / UNIX Shell: Sort Date

by Vivek Gite on October 23, 2008 · 8 comments

Q. How do I sort date type of data stored in a text file which is in following sample format:

Code         Date          TIME
HOS05	23/12/2008	10AM
HOS06	15/12/2008	2PM
HOS62	29/12/2008	10AM
HOS64	23/12/2008	2PM
HOS70	26/12/2008	10AM
ZFT01	06/12/2008	10AM
HOS73	11/12/2008	2PM
MHOS051	05/12/2008	10AM
MHOS041	20/12/2008	2PM
MHOS042	27/12/2008	2PM
MHOS053	11/12/2008	10AM
MHOS043	30/12/2008	2PM

How do I sort data date and time wise?

{ 8 comments }

How can I set the system date and time from the command prompt (bash shell)? I don’t have GUI installed and I am login over ssh session. How can I set date under Linux operating systems?

{ 80 comments }