LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   date and time in promt (https://www.linuxquestions.org/questions/linux-general-1/date-and-time-in-promt-384718/)

shukla_chanchal 11-19-2005 05:06 PM

date and time in promt
 
i want todays date and time in my promt
how can i get it
if anyone throw some light on it it would be helpful for me
thanks

Keruskerfuerst 11-20-2005 07:17 AM

just type date in console: see "man date" for details.

bigrigdriver 11-20-2005 07:46 AM

In the users home directory there is a file called .bashrc (~/.bashrc). In that file, there is a line which begins 'PS1='. It may look something like this:

PS1="\[\033[31;1m\]\u]".

Edit that line to look like this:

PS1="\[\033[31;1m\]\u \d \t]"

or like this

PS1="\[\033[31;1m\]\u \d \T]".

\t will display time in 24-hour format; \T will display in 12-hour format.

linmix 11-20-2005 09:30 AM

For more of the same (and a thorough explanation of it all) check out this tutorial .

shukla_chanchal 11-20-2005 10:13 AM

thanks a lot i got my answer

can u also ive me the info about the itme in milliseconds

linmix 11-20-2005 10:22 AM

Sorry, gave you the wrong like just then. It should have been: Bash Prompt HOWTO . If you check out chapter 4.2 it'll tell you how to use the 'date' command inside a prompt description. 'man date' will tell you the option you need for miliseconds...
If you still can't figure it out, post what you did get and ask again.

shukla_chanchal 11-20-2005 06:03 PM

promt works
 
thanks boss u have given me the accurate answer
i am really gratefull to read all that
thanks agian

shukla_chanchal 11-21-2005 08:34 PM

shell with image background
 
fine its all working
now suppose i want some image in background of my Konsole or shell
is it possible if it is tell me how
i think someone must know that

linmix 11-22-2005 11:24 AM

check out the preferences (it's in one of the sub-menus, probably under edit - not at my linux box right now)
I know for a fact you can select a solid color, gradients and transparency. That being possible, I imagine an image is possible too. Keep it simple though, because too much eye-candy will make it really hard to read the shell


All times are GMT -5. The time now is 04:01 AM.