About
Pricing
Community
Teams
Start Free Trial
Log in
xtstech
asked on
2/18/2010
linux change date from command line
How I can change the current date from the command line without having to specify a time as well? I need to script changing the date for a test I am doing.
Linux
3
1
Last Comment
xtstech
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
amit_g
2/18/2010
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
woolmilkporc
2/18/2010
You can try this
date
MMDD
$(date "+%H%M")
Replace
MMDD
with the desired month and day values. Leave the rest as is.
No warranty - I have no chance to test it right now.
wmp
xtstech
2/18/2010
ASKER
Thanks. Worked perfectly
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
date MMDD$(date "+%H%M")
Replace MMDD with the desired month and day values. Leave the rest as is.
No warranty - I have no chance to test it right now.
wmp