hadoop dfs –ls是显示指定目录下的所有文件以及目录信息,如果指定的是文件,则显示该文件信息
提示你core-site.xml这个文件没有,你可以去hadoop\etc\hadoop底下去找找,如果没有就创建一个,内容如下:
?xml
version="1.0"
encoding="utf-8"?
?xml-stylesheet
type="text/xsl"
href="configuration.xsl"?
licensed
under
the
apache
license,
version
2.0
(the
"license");
you
may
not
use
this
file
except
in
compliance
with
the
license.
you
may
obtain
a
copy
of
the
license
at
http://www.apache.org/licenses/license-2.0
unless
required
by
applicable
law
or
agreed
to
in
writing,
software
distributed
under
the
license
is
distributed
on
an
"as
is"
basis,
without
warranties
or
conditions
of
any
kind,
either
express
or
implied.
see
the
license
for
the
specific
language
governing
permissions
and
limitations
under
the
license.
see
accompanying
license
file.
put
site-specific
property
overrides
in
this
file.
fs.default.name
hdfs://localhost:9000
mapred.child.tmp
/home/u/hadoop/tmp