Show date by terminal

4

As soon as you can change the date of linux by the terminal in the format {month} {day} {time} {minute} {year}, all together, I wanted to know how to save the current date in a variable (Python) change the date and time with a terminal application and then change back to the date in the variable.

ex: date: Wed Nov 1 11:22:33 UTC 2015 I need help in showing: 11 (November) 1 (day) 11 (hour) 22 (minute) 15 (year) without the "()"

    
asked by anonymous 11.11.2015 / 01:09

1 answer

2

Well, the date manual is quite complete as to the format. In your case, I suggest the following command line:

date +"%d%m%H%M%G"

where in my terminal, it provides the following output:

250211152016

PS. Take a look at the date handbook to understand output formats.

    
25.02.2016 / 15:14