How to view files on Hadoop
You can use the following command to view files on Hadoop:
- list the contents of the HDFS directory
hdfs dfs -ls /
- List the contents of the specified path in HDFS.
- The user named hadoop
hdfs dfs -ls /user/hadoop
- Display the contents of a file using hdfs dfs command.
- the file input.txt located in the Hadoop user directory
hdfs dfs -cat /user/hadoop/input.txt
- http://
:50070
Please make sure that Hadoop is properly configured and the Hadoop cluster is up and running before using these commands.