Avatar of xtstech
xtstech
 asked on

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

Avatar of undefined
Last Comment
xtstech

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
amit_g

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

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

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