LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-19-2005, 06:06 PM   #1
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Rep: Reputation: 15
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
 
Old 11-20-2005, 08:17 AM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Kubuntu 18.04, Manjaro, Win 10
Posts: 2,159

Rep: Reputation: 158Reputation: 158
just type date in console: see "man date" for details.
 
Old 11-20-2005, 08:46 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.
 
Old 11-20-2005, 10:30 AM   #4
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
For more of the same (and a thorough explanation of it all) check out this tutorial .
 
Old 11-20-2005, 11:13 AM   #5
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Original Poster
Rep: Reputation: 15
thanks a lot i got my answer

can u also ive me the info about the itme in milliseconds
 
Old 11-20-2005, 11:22 AM   #6
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
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.
 
Old 11-20-2005, 07:03 PM   #7
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Original Poster
Rep: Reputation: 15
promt works

thanks boss u have given me the accurate answer
i am really gratefull to read all that
thanks agian
 
Old 11-21-2005, 09:34 PM   #8
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Original Poster
Rep: Reputation: 15
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
 
Old 11-22-2005, 12:24 PM   #9
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 11:17 AM
date and time osheasf Linux - Software 1 06-15-2005 08:47 AM
Display the date and time from another time zone lothario Linux - Software 4 07-31-2004 04:27 PM
Date and Time mairul Debian 7 12-25-2003 01:26 PM
Date and time. vexer Slackware 2 08-13-2003 11:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration