29
6
I'm looking for a way to display my time in Debian Linux as a timestamp, e.g.
1279628325
I can't find any options to do that with the date
command. Any ideas?
29
6
I'm looking for a way to display my time in Debian Linux as a timestamp, e.g.
1279628325
I can't find any options to do that with the date
command. Any ideas?
58
You can do this with
date +%s
For more possibilities, see
man date
2
My favorite way:
perl -e 'print time'
1
srand
without a value uses the current timestamp with these Awk
implementations:
so you can use Awk:
awk 'BEGIN {srand(); print srand()}'
Or the awk Velour library:
velour -n 'print t_now()'
1
note this is not POSIX http://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html
– Steven Penny – 2018-05-27T02:05:58.253