bash get timestamp
// If you want to get unix timestamp, then you need to use:
timestamp=$(date +%s)# put current date as yyyy-mm-dd in $date
# -1 -> explicit current date, bash >=4.3 defaults to current time if not provided
# -2 -> start time for shell
printf -v date '%(%Y-%m-%d)T\n' -1
# put current date as yyyy-mm-dd HH:MM:SS in $date
printf -v date '%(%Y-%m-%d %H:%M:%S)T\n' -1
# to print directly remove -v flag, as such:
printf '%(%Y-%m-%d)T\n' -1
# -> current date printed to terminal
date +%s
# Give the number of seconds since epoch
Also in C++:
- see how large a directory is linux
- centos install lsb_release
- bash if greater than
- git how to archive a branch
- ./RsaCtfTool.py: command not found kali linux
- git status do not show permission changes
- "jetbrains-license-server" "github"
- Could not install from "android" as it does not contain a package.json file
- update grub archlinux
- docker --restart example
- git ignore content of a folder
- rstudio find out if package is installed
- packages required to install psycopg2
- how to use vim
- git ls files sort by date
- git log for specific file
- delete a folder then git push
- linux ram info
- rancher 2 on ubuntu 20.04
- sbt scala install ubuntu
- git undo commit
- sharegate powershell exclude file type
- stop localhost server
- install terminus in ubuntu