LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 08-11-2009, 02:39 PM   #1
Mr. ameya sathe
Member
 
Registered: Jul 2007
Distribution: RedHat Enterprise 5 Server Edition; Ubuntu 8.04 ; RHCE Certificate number: 805008741034103
Posts: 78
Blog Entries: 7

Rep: Reputation: 15
Question Undocumented options of date command and other commands


The other day; I was fiddling with options of `date' command. I found out an option of -I with it. But; this option is not documented anywhere in the man pages & info pages. Google is also not easily yielding result about it.

Code:
date -I
Any pointers for the date -I command.
 
Old 08-11-2009, 08:02 PM   #2
David the H.
Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 5,327

Rep: Reputation: 1199Reputation: 1199Reputation: 1199Reputation: 1199Reputation: 1199Reputation: 1199Reputation: 1199Reputation: 1199Reputation: 1199
Well, the only thing I could find was this:

http://www.mail-archive.com/bug-core.../msg06084.html

Which suggests that it's a deprecated option, and so will probably disappear sometime in the future.
 
Old 08-12-2009, 12:54 AM   #3
Kenhelm
Member
 
Registered: Mar 2008
Location: N. W. England
Distribution: Mandriva
Posts: 299

Rep: Reputation: 115Reputation: 115
'-I' is on this 2004 man page
http://www.linuxmanpages.com/man1/date.1.php
Code:
-ITIMESPEC, --iso-8601[=TIMESPEC]

     output date/time in ISO 8601 format.
     TIMESPEC=`date' for date only, `hours', `minutes', or
    `seconds' for date and time to the indicated precision.
     --iso-8601 without TIMESPEC defaults to `date'.
Code:
# Examples in British Summer Time (= Greenwich Mean Time +0100)

date -I
2009-08-12

date -Idate
2009-08-12

date -Ihours
2009-08-12T04+0100

date -Iminutes
2009-08-12T04:02+0100

date -Iseconds
2009-08-12T04:03:26+0100

# Some versions of 'date' can give nano seconds
date -Ins
2009-08-12T04:04:20,582835176+0100

# d,h,m,s,n can be used instead of date,hours,minutes,seconds,ns
 
Old 08-12-2009, 06:23 AM   #4
junust
Member
 
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 78

Rep: Reputation: 15
By the way, the same like `date -I` info you will receive if issue command `date` on checkpoint secure plat firewall, where is the really `date` command info you will see if type /bin/date
 
  


Reply

Tags
date, deprecated


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to disable force options in linux commands iamjayanth Linux - Security 5 06-09-2009 07:51 PM
How can I append the date/time stamp to commands in history? abefroman Linux - Security 2 05-29-2008 11:21 AM
makefile commands & options fpb Linux - General 1 01-04-2006 04:45 AM
Upgrading undocumented server Gsee Suse/Novell 0 07-18-2005 07:27 PM
how to see typed commands with date? vaoc Linux - Security 1 08-06-2004 01:43 PM


All times are GMT -5. The time now is 11:47 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration