I would like dmesg to print human readable date times without passing the -T parameter. Is there a way to do this without setting up an alias? In config files maybe?
dmesg output:
# dmesg | tail -1
[ 6.639729] IPv6: enp03: link becomes ready
in this case I would like dmesg to print:
# dmesg | tail -1
[Fri Sep 15 08:15:29 2017] IPv6: enp03: link becomes ready
If you don't want an alias, which would usually be the best choice, you could place a script in a directory which is in
PATH
before/bin
(if the realdmesg
is/bin/dmesg
), e. g.~/bin/dmesg
:Don't forget to
chmod +x
.