Support Questions

Find answers, ask questions, and share your expertise

copy directory from hdfs between two specific date

I want to copy directories into local from hdfs from one specific date to another one , please suggest command to do the same .

1 REPLY 1

Super Collaborator

Are you asking for the command on how to copy files from hdfs to a local dir? Or do you ask for the scheduling to be executed on a specific date? Or do you need to know on how to use the date in a file or directory name?

the first one: use the hdfs command like 'hdfs dfs -get <hfdslocation> <localdst>' further documentation at: https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-common/FileSystemShell.html

the second one: try using cron, or the scheduler used in your environment

the third one: check the option of the date command and add it the filename in command line quoted with backticks (`)