You are not logged in.
How can I get information about the recently finished jobs / bash commands? (eg. date / time of termination)
Offline
"man bash" see HISTTIMEFORMAT. That may get you near to where you want to be.
Offline
@ vacant, while that will put a timestamp for each command executed, it won't help with finished commands.
@ Bailando, you'll probably have to play around with ps output.
Last edited by x33a (2014-01-01 11:07:16)
Offline
$ e echo foo
foo
$ type e
e is a function
e ()
{
$@ && echo $@ - $(date) >> test.txt
}
$ cat test.txt
echo foo - Wed Jan 1 12:10:54 CET 2014
$ e echo bar
bar
$ cat test.txt
echo foo - Wed Jan 1 12:10:54 CET 2014
echo bar - Wed Jan 1 12:11:09 CET 2014
$ e htop
<here I do something with htop for a little while>
$ cat test.txt
echo foo - Wed Jan 1 12:10:54 CET 2014
echo bar - Wed Jan 1 12:11:09 CET 2014
htop - Wed Jan 1 12:15:14 CET 2014
Last edited by karol (2014-01-01 11:20:36)
Offline
Do you want to know how long a command is running?
time yourcommand
Offline