Search code examples
hadoophdfsoozieoozie-coordinator

Is there any function for HDFS to get today's date?


I want to schedule -mkdir to make directory everyday with the date of the day.

Is there any way to get today's date for the command:

hdfs dfs -mkdir /home/<date>

Solution

  • Use the linux date command

    hdfs dfs -mkdir /home/`date +%Y%m%d`