Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

date linux format yyyymmdd

# put current date as yyyy-mm-dd in $date
date=$(date '+%Y-%m-%d')

# put current date as yyyy-mm-dd HH:MM:SS in $date
date=$(date '+%Y-%m-%d %H:%M:%S')

# print current date directly
echo $(date '+%Y-%m-%d')
Comment

linux get date yyyymmdd

date '+%Y/%m/%d' #Output 2022/03/11
Comment

PREVIOUS NEXT
Code Example
Shell :: how to open xampp control panel in ubuntu 
Shell :: download teamviewer for ubuntu using terminal 
Shell :: install openzeppline 
Shell :: create react app typescript 
Shell :: how can I find perticular extension in ubuntu? 
Shell :: git pull with submodules 
Shell :: run disk usage analyzer as root ubuntu 20.04 
Shell :: Install redis on macbook pro 
Shell :: install curl on ubuntu 
Shell :: ubuntu flush dns 
Shell :: curl not found 
Shell :: stop nginx 
Shell :: m1 pod install 
Shell :: list file size as mb 
Shell :: beautifulsoup python 
Shell :: get my ssh key 
Shell :: brew reinstall mysql 
Shell :: recent branches 
Shell :: Amazon Linux 2 AMI install docker 
Shell :: set the default branch to main 
Shell :: run requirements.txt conda 
Shell :: uninstall expo cli 
Shell :: Failed at the node-sass@4.10.0 postinstall script. 
Shell :: how to uninstall oh my zsh 
Shell :: refresh bash_profile 
Shell :: for loop on date in bash 
Shell :: wsl ubuntu reboot 
Shell :: install postman in linux 
Shell :: rvm set default 
Shell :: firebase-tools npm 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =