In order to display the epoch time in Linux/macOS terminal we can make use of the date command with option +%sExample: Zsh Shell
% data +%s 1629634783
Example: Bash Shell
bash-3.2$ date +%s 1629634950 bash-3.2$
What is Epoch time?
It is the number of seconds that have elapsed since midnight of January 1, 1970, in UTC.
More Posts related to Linux,
- How to install npm on Ubuntu
- bash: cls: command not found
- Execute .bin and .run file Ubuntu Linux
- Command to display epoch time Terminal
- How to ls command to output one entry per line [macOS/Linux/Bash]
- Terminal display next month Calendar
- The Date Command and its usage [Linux - Unix - macOS]
- zsh hello world example
- How to install python pip on Ubuntu using apt command
- ls command sort by file size [Linix/UNIX/macOS/bash]
- How to check uptime of Linux/Unix/macOS system/server using console command?
- How to remove or uninstall Java from Ubuntu using apt-get
- ls command: sort files by name alphabetically A-Z or Z-A [Linux/Unix/macOS/Bash]
- Copy entire directory using Terminal Command [Linux, Mac, Bash]
- Install Java Runtime Environment (Oracle or open JRE) on Ubuntu
- [Ubuntu] Search a package and versions using apt command
- How to change bash terminal prompt string and color