1822986 Members
3784 Online
109645 Solutions
New Discussion юеВ

Changing the date

 
Habib_4
Advisor

Changing the date

Hi guys,

The time on my system at the moment is:
Tue Aug 8 11:45:27 MDT 2000

I am trying to change the time on it by running the following:

date -u 09171800[[20]06]]

However, it has brought back the following response:

date: bad conversion

What am I doing wrong?
Please advise

Habib
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: Changing the date

Shalom Habib,

Try it a bit simpler

Without the brackets.

date 08172006

The man page on date explains it better than I.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: Changing the date

The man page is a little cryptic. The square brakets (in this case) signify an optional field. SO the numbers are month day hour minute. Then if you want to, you can add the year but most people do not since the assumption is that it is the current year. See the examples at the bottom of the man page.


Bill Hassell, sysadmin