Sagar Kalburgi
Sagar Kalburgi

Reputation: 127

Hadoop ls command not working

I am able to create directories in HDFS but when I submit 'ls' command it is giving the error mentioned below. I got the same error when I gave bin/hadoop dfs –ls /. What am I missing?

hduser@Server-8-22:/usr/local/hadoop$ bin/hadoop fs -mkdir skalburginput
Warning: $HADOOP_HOME is deprecated.

hduser@Server-8-22:/usr/local/hadoop$ bin/hadoop fs -mkdir skalburgoutput
Warning: $HADOOP_HOME is deprecated.

hduser@Server-8-22:/usr/local/hadoop$ bin/hadoop fs –ls
Warning: $HADOOP_HOME is deprecated.

ls: Unknown command
Usage: java FsShell
       [-ls <path>]
       [-lsr <path>]
       [-du <path>]
       [-dus <path>]
       [-count[-q] <path>]
       [-mv <src> <dst>]

Upvotes: 0

Views: 2130

Answers (1)

Milind Jindal
Milind Jindal

Reputation: 137

While making directory Mention the full path for the directory, starting from the root. i.e: /your/location/skalburginput

For the ls command, Try:

$hdfs dfs -ls /

Upvotes: 2

Related Questions