The steps to follow the Hdfs commands using Hive
- Open the Hive CLI by typing “hive” in your terminal.
- Once you are in the Hive CLI, you can use the “dfs” command to execute any Hadoop command. For example, if you want to list the contents of a directory in HDFS, you can use the following command:
- dfs is alias for hadoop fs
- If you want list the files using this command dfs -ls /path/to/directory;
5.if you want list the files in recursive fashion dfs -ls -r /path/to/directory;