Search code examples
linuxbashshellhdfsunix-timestamp

How to create a directory with yesterdays date in HDFS


How can i create a directory with yesterday's date hadoop file system?

I tried the below command and it is creating with today's date

hadoop fs -mkdir /user/"$(date +"%d-%m-%Y")"

thanks


Solution

  • Use: date --date="13:00 yesterday"