Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)
I am interested in Python, Ruby, and Haskell, any other approaches are also welcome.

Wanted to know which is the easiest way to generate Unix timestamps?

1 Answer

0 votes
by (36.8k points)

In Linux or MacOS you can use:

date +%s

where

Example output now 1454000043.

  • +%s, seconds since 1970-01-01 00:00:00 UTC. (GNU Coreutils 8.24 Date manual)

To know about Linux join the Linux training

Do check out the video below

 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Nov 29, 2020 in Linux by blackindya (18.4k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...