ondreduty9759 ondreduty9759
  • 03-12-2020
  • Computers and Technology
contestada

How would you change your prompt to have it display the current time (hour and minute) and the full path of the current directory?

Respuesta :

tgalligan92 tgalligan92
  • 03-12-2020

Answer:I tried using following command:

Code:

export PS1="$(date +%k:%M:%S) $ "

but it gave me a fixed time in prompt whereas my objective is to get the current time everytime.

Code:

$ export PS1="$(date +%k:%M:%S) $ "

17:42:42 $

17:42:42 $ date

Tue Oct  2 17:42:54 PDT 2012

17:42:42 $

Explanation:

Answer Link

Otras preguntas

NEED HELP Which word is not related to the thinking process? A. concur B. conglomeration C. conjecture D. exult
If employee A logged 120 hours of travel in 4 years and employee B logged hours of travel at a 20% higher rate, how many more hours did employee B have than emp
If a sequence is defined recursively by f(0)=2 and f(n+1)=-2f (n)+3 for n> or equal to 0,what is f(2)?
is the following sentence true or false? ferns are small plants that can only grow low to the ground?
What does the multiple-meaning word ray mean in this sentence?A ray of sunshine shone on the wall.
Why are commercial advertisements made?
Which best expresses what the speaker's father teaches him in "My Father Is a Simple Man"? A. Old age slows even the most productive and hard-working people. B.
why would it be difficult to use static electricity in electrical devices
which of these has the same value as 35/15? a) 1 2/3 b) 1 2/5 c) 1 1/5 d) 2 1/3
Figure ABCDE is similer to figure FGHIJ, AB=16, CD=10 and EA=12. What is the measure of HI?