Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

date in - format linux

# 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

PREVIOUS NEXT
Code Example
Shell :: docker machine ip 
Shell :: how to install postgresql in manjaro 
Shell :: git change personal access token command line 
Shell :: install ip addr on ubuntu 
Shell :: spacevim install 
Shell :: du -sh ocult files 
Shell :: cmake: not found 
Shell :: ufw allow http and httpw connections 
Shell :: stop adb device 
Shell :: kali linux upgrade to new version 
Shell :: untar command 
Shell :: wsl delete 
Shell :: zsh: command not found: nslookup 
Shell :: fedora spotify 
Shell :: .env.local not working react 
Shell :: how to initialize a git repository command line 
Shell :: show fortigate uptime 
Shell :: install all pack kubectl kubens kubectx 
Shell :: create a virtual environment python conda 
Shell :: how to install openssl on windows 10 
Shell :: linux remove nested files with names 
Shell :: add all files in directory to git 
Shell :: batch copy silent 
Shell :: install pg module 
Shell :: how install lxd on lxd ubuntu 18.04 
Shell :: install firewalld ubuntu 20.04 
Shell :: git update upstream url 
Shell :: awk get second column from command output 
Shell :: clear history linux 
Shell :: extract a tar.xz file linux 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =