How to print the content of a file in console present in HDFS

0 votes

I am new to Hadoop. I have uploaded the file in HDFS using the following command :

  bin/hadoop dfs -copyToLocal hdfs/path local/path

Is there a way where I do not have to download the file from HDFS to local file system for viewing the content and I can directly view the content in HDFS?

Apr 19, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
5,154 views

1 answer to this question.

0 votes

Yes, you can use hdfs dfs command with -cat argument and pass the file location.

hdfs dfs -cat /path/to/file/in/hdfs
answered Apr 19, 2018 by Shubham
• 13,490 points

Related Questions In Big Data Hadoop