≡ Menu

date time

HowTo: UNIX Set Date and Time Command

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?
[click to continue…]

Linux / UNIX: TZ Environment Variable

What is the correct format for a TZ (time zone) environment variable for use with the Linux or UNIX operating system?
[click to continue…]

Bash Infinite Loop Examples

How do I write an infinite loop in Bash script under Linux or UNIX like operating systems?
[click to continue…]

VI / VIM: Insert Current Date / Time

How do I display and insert current date and/or time under vi or VIM text editor?
[click to continue…]

Linux / UNIX Shell: Sort Date

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?
[click to continue…]