Reputation: 2479
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
Upvotes: 1
Views: 9142
Reputation: 19375
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?
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 real dmesg
is /bin/dmesg
), e. g. ~/bin/dmesg
:
exec /bin/dmesg -T "$@"
Don't forget to chmod +x
.
Upvotes: 7