Research breakthrough possible @S-Logix pro@slogix.in

Office Address

Social List

How to List the Directory in HDFS?

Hadoop

Listing a Directory in HDFS

  • Description:
    Listing a directory in HDFS (Hadoop Distributed File System) involves retrieving and displaying the contents of a specific directory path in the distributed file system, including files, subdirectories, and their metadata (such as permissions, owner, size, and modification date).
Syntax
  • Command:
    $ hdfs dfs -ls
Example
  • Example Commands:
    • $ hdfs dfs -ls /user/hduser
    • $ hdfs dfs -ls /data
    • List Directory Screenshot