H I O X INDIA
LINUX Commands
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Templates 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)
Español Français 中文 Deutsch
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

LINUX / UNIX cmd
Introduction
Commands in A
Commands in B
Commands in C
Commands in D
Commands in E
Commands in F
Commands in G
Commands in H
Commands in I
Commands in J
Commands in K
Commands in L
Commands in M
Commands in N
Commands in P
Commands in R
Commands in S
Commands in T
Commands in U
Commands in W
Commands in Y
More about Linux
Feedback




date Linux Commands


Topic

What is Linux date Command?




Explanation

date COMMAND:
     date command prints the date and time.

SYNTAX:
  The Syntax is
     date  [options] [+format] [date]

OPTIONS:
     
-a Slowly adjust the time by sss.fff seconds (fff represents fractions of a second). This adjustment can be positive or negative.Only system admin/ super user can adjust the time.
-s date-string Sets the time and date to the value specfied in the datestring. The datestr may contain the month names, timezones, 'am', 'pm', etc.
-u Display (or set) the date in Greenwich Mean Time (GMT-universal time).

Format:

%a Abbreviated weekday(Tue).
%A Full weekday(Tuesday).
%b Abbreviated month name(Jan).
%B Full month name(January).
%c Country-specific date and time format..
%D Date in the format %m/%d/%y.
%j Julian day of year (001-366).
%n Insert a new line.
%p String to indicate a.m. or p.m.
%T Time in the format %H:%M:%S.
%t Tab space.
%V Week number in year (01-52); start week on Monday.



EXAMPLE:
     
  1. date command
    date

    The above command will print Wed Jul 23 10:52:34 IST 2008

  2. To use tab space:
    date +"Date is %D %t Time is %T"

    The above command will remove space and print as
    Date is 07/23/08 Time is 10:52:34

  3. To know the week number of the year,
    date -V

    The above command will print 30

  4. To set the date,
    date -s "10/08/2008 11:37:23"

    The above command will print Wed Oct 08 11:37:23 IST 2008






        Find LINUX Commands... Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this LINUX / UNIX cmd reference. This is a copyright content.


privacy policy     license     sitemap
© 2004-2009 HIOX INDIA - hioxindia.com

Other Links