jetulis
jetulis

Reputation: 168

hadoop dfs -ls complains

Can anyone let me know what seems to be wrong here ? hadoop dfs command seems to be OK but any following options are not recognized.

[hadoop-0.20]$bin/hadoop dfs -ls ~/wordcount/input/ ls: Cannot access /home/cloudera/wordcount/input/ : No such file or directory

Upvotes: 5

Views: 5695

Answers (2)

Manish Pansari
Manish Pansari

Reputation: 401

FS relates to a generic file system which can point to any file systems like local, HDFS, s3 etc But dfs is very specific to HDFS. So when we use FS it can perform operation with from/to local or hadoop distributed file system to destination. But specifying DFS operation relates to HDFS.

Upvotes: 0

Anton
Anton

Reputation: 485

hadoop fs -ls /some/path/here - will list a HDFS location, not your local linux location try first this command

hadoop fs -ls /

then investigate step by step other folders.

if you want to copy some files from local directory to users directory on HDFS location, then just use this:

hadoop fs -mkdir /users
hadoop fs -put /some/local/file /users

for more hdfs commands see this: http://hadoop.apache.org/common/docs/r0.20.0/hdfs_shell.html

Upvotes: 13

Related Questions