Link to home
Create AccountLog in
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.
ASKER CERTIFIED SOLUTION
Avatar of amit_g
amit_g
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
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
Avatar of xtstech
xtstech

ASKER

Thanks.  Worked perfectly