soohan
soohan

Reputation: 137

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>

Upvotes: 1

Views: 1385

Answers (1)

franklinsijo
franklinsijo

Reputation: 18270

Use the linux date command

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

Upvotes: 3

Related Questions