bash get current date
# syntax
$(date)
# example (when running the command of "date")
echo $(date)
# OUTPUT: Mon May 11 13:20:57 SAST 2020
# To return a specific FORMAT, search "bash get date format"
bash get current date
# syntax
$(date)
# example (when running the command of "date")
echo $(date)
# OUTPUT: Mon May 11 13:20:57 SAST 2020
# To return a specific FORMAT, search "bash get date format"
current date bash
date +'FORMAT'
### mm/dd/yyyy ###
date +'%m/%d/%Y'
## Time in 12 hr format ###
date +'%r'
## backup dir format ##
backup_dir=$(date +'%m/%d/%Y')
echo "Backup dir for today: /nas04/backups/${backup_dir}"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us