Hadoop ls

Share

                               Hadoop ls

In Hadoop, the hadoop fs -ls command is used to list the files and directories in a specified Hadoop Distributed File System (HDFS) directory. It’s similar to the ls command in Unix/Linux for listing files and directories in a local file system. Here’s the basic syntax of the hadoop fs -ls command:

bash
hadoop fs -ls <HDFS-path>
  • <HDFS-path>: This is the path to the directory or file in HDFS that you want to list. It can be an absolute or relative HDFS path.

Examples:

  1. To list the contents of the root directory in HDFS, you can use the following command:

    bash
    hadoop fs -ls /

    This command will display the files and subdirectories in the root directory of HDFS.

  2. To list the contents of a specific directory in HDFS, you can provide the path to that directory:

    bash
    hadoop fs -ls /user/yourusername/some_directory

    Replace /user/yourusername/some_directory with the actual path you want to list.

  3. To list the contents of a file in HDFS, you can provide the path to that file:

    bash
    hadoop fs -ls /user/yourusername/some_directory/some_file.txt

    This will provide information about the specified file, including its permissions, owner, group, size, and modification timestamp.

Hadoop Training Demo Day 1 Video:

 
You can find more information about Hadoop Training in this Hadoop Docs Link

 

Conclusion:

Unogeeks is the No.1 IT Training Institute for Hadoop Training. Anyone Disagree? Please drop in a comment

You can check out our other latest blogs on Hadoop Training here – Hadoop Blogs

Please check out our Best In Class Hadoop Training Details here – Hadoop Training

💬 Follow & Connect with us:

———————————-

For Training inquiries:

Call/Whatsapp: +91 73960 33555

Mail us at: info@unogeeks.com

Our Website ➜ https://unogeeks.com

Follow us:

Instagram: https://www.instagram.com/unogeeks

Facebook:https://www.facebook.com/UnogeeksSoftwareTrainingInstitute

Twitter: https://twitter.com/unogeeks


Share

Leave a Reply

Your email address will not be published. Required fields are marked *