2

Is there any way to show in the konsole the time when a command was executed? Something like: user@pc:~$ ls 13:05

user@pc:~$ cd folder/ 13:06

user@pc:~$ cd .. 13:07

1 Answers1

0

You'll need to change your prompt to contain a timestamp. This will depend on the shell you're using (probably bash), instead of the terminal emulator (konsole). Assuming you are using bash, alter your $PS1 environment variable to contain the output of a command that prints the time, such as date:

$ PS1="$PS1: $(date -R) >"

Using that as a starting point, design a prompt you like. man date to see the different ways you can print out the date/time.

After finding a command that gives you what you want, add it to your ~/.bashrc file to make it permanent.

Jon Carter
  • 2,836
  • 1
  • 20
  • 26
  • This answer will work, but it looks like @Maxim gave a link in that comment that provides a more thorough explication of the solution. – Jon Carter Apr 05 '16 at 17:37