<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Sandbox - ls command error - new to Linux and this. in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174252#M136515</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12496/nichopper.html" nodeid="12496"&gt;@Nic Hopper&lt;/A&gt; &lt;/P&gt;&lt;P&gt;yes so now you're good to go as you have access to HDFS via CLI (Command Shell). You can now upload and download files using CLI&lt;/P&gt;&lt;PRE&gt;sudo -u username hdfs dfs -put file /user/username/
sudo -u username hdfs dfs -get file /user/username/file&lt;/PRE&gt;&lt;P&gt;if you have your username available locally on the OS then you can skip the part with &lt;/P&gt;&lt;PRE&gt;sudo -u username&lt;/PRE&gt;&lt;P&gt;just change to your userID and run those commands&lt;/P&gt;&lt;PRE&gt;su username
hdfs dfs -ls
hdfs dfs -put
hdfs dfs -get&lt;/PRE&gt;&lt;P&gt;also as a good practice, please accept the answer to close this thread.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2016 23:33:24 GMT</pubDate>
    <dc:creator>aervits</dc:creator>
    <dc:date>2016-08-15T23:33:24Z</dc:date>
    <item>
      <title>Sandbox - ls command error - new to Linux and this.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174247#M136510</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I wondered if someone could give me some pointers as to where I'm going wrong. I've spun up the Azure HortonWorks HDP 2.4 machine and I can connect to it via Putty and WINSCP. My issue however is with running some of the hdfs dfs commands however (demo'd in a PluralSight video').&lt;/P&gt;&lt;P&gt;This is what I'm doing;&lt;/P&gt;&lt;P&gt;1. Open Putty on my machine and connect using my login.&lt;/P&gt;&lt;P&gt;2. Then I run "hdfs dfs -ls" - I get back the message "ls: '.':No such file or directory". &lt;/P&gt;&lt;P&gt;3. Looking at hdfs dfs -help's definition of -ls it says "if the path is not specified" which its not then "the contents of /user/&amp;lt;currentuser? will be listed",&lt;/P&gt;&lt;P&gt;4. So then I tried "hdfs dfs - ls /user" and I get back some results, although there is no folder matching my login name.&lt;/P&gt;&lt;P&gt;Am I missing something obvious or is my user folder a little bit messed up for some reason? if I just run "ls" from the prompt I get no results. If I browser to the /usr folder I can see other folders but not one with my name.&lt;/P&gt;&lt;P&gt;Any help/ideas would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nic&lt;/P&gt;</description>
      <pubDate>Sat, 13 Aug 2016 22:50:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174247#M136510</guid>
      <dc:creator>NicHopper</dc:creator>
      <dc:date>2016-08-13T22:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sandbox - ls command error - new to Linux and this.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174248#M136511</link>
      <description>&lt;P&gt;create your user directory&lt;/P&gt;&lt;PRE&gt;sudo -u hdfs hdfs dfs -mkdir /user/username
sudo -u hdfs hdfs dfs -chown -R hdfs:username /user/username&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Aug 2016 23:08:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174248#M136511</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-08-13T23:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sandbox - ls command error - new to Linux and this.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174249#M136512</link>
      <description>&lt;P&gt;Hi Artem,&lt;/P&gt;&lt;P&gt;Thanks for reply, when I run the first command via Putty I get told&lt;/P&gt;&lt;P&gt;"mkdir: Cannot create directory /user/nic. Name node is in safe mode." I'm not sure why it would be in safe mode unless that the default.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nic&lt;/P&gt;</description>
      <pubDate>Sun, 14 Aug 2016 00:30:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174249#M136512</guid>
      <dc:creator>NicHopper</dc:creator>
      <dc:date>2016-08-14T00:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sandbox - ls command error - new to Linux and this.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174250#M136513</link>
      <description>&lt;P&gt;Run the following command, then repeat the earlier commands&lt;/P&gt;&lt;PRE&gt;sudo -u hdfs hdfs dfsadmin -safemode leave

&lt;/PRE&gt;</description>
      <pubDate>Sun, 14 Aug 2016 04:45:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174250#M136513</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-08-14T04:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sandbox - ls command error - new to Linux and this.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174251#M136514</link>
      <description>&lt;P&gt;Hi Artem,&lt;/P&gt;&lt;P&gt;Firstly thanks for your time with this. So I ran the command to have HDFS leave safe mode, worked fine.&lt;/P&gt;&lt;P&gt;Then I ran the command to create my hdfs folder and grant permissions, worked fine.&lt;/P&gt;&lt;P&gt;so now when I run "hdfs  dfs -ls" I don't get the error, instead it thinks about it for a minute and then returns nothing and awaits my next command, not sure if that's right or not. If I run "hdfs dfs -ls /user/" then again it thinks about it then returns a list of folders (including me) so this is good, matches up to the PluralSight video, except he has the hue folder and I don't.&lt;/P&gt;&lt;P&gt;But for now I'm back in the game, so thanks and its nice to know what the commands actually do as well.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nic&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 22:26:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174251#M136514</guid>
      <dc:creator>NicHopper</dc:creator>
      <dc:date>2016-08-15T22:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sandbox - ls command error - new to Linux and this.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174252#M136515</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12496/nichopper.html" nodeid="12496"&gt;@Nic Hopper&lt;/A&gt; &lt;/P&gt;&lt;P&gt;yes so now you're good to go as you have access to HDFS via CLI (Command Shell). You can now upload and download files using CLI&lt;/P&gt;&lt;PRE&gt;sudo -u username hdfs dfs -put file /user/username/
sudo -u username hdfs dfs -get file /user/username/file&lt;/PRE&gt;&lt;P&gt;if you have your username available locally on the OS then you can skip the part with &lt;/P&gt;&lt;PRE&gt;sudo -u username&lt;/PRE&gt;&lt;P&gt;just change to your userID and run those commands&lt;/P&gt;&lt;PRE&gt;su username
hdfs dfs -ls
hdfs dfs -put
hdfs dfs -get&lt;/PRE&gt;&lt;P&gt;also as a good practice, please accept the answer to close this thread.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 23:33:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174252#M136515</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-08-15T23:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sandbox - ls command error - new to Linux and this.</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174253#M136516</link>
      <description>&lt;P&gt;Thanks again Artem for your response and anyone else who took the time read it.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 15:28:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sandbox-ls-command-error-new-to-Linux-and-this/m-p/174253#M136516</guid>
      <dc:creator>NicHopper</dc:creator>
      <dc:date>2016-08-16T15:28:58Z</dc:date>
    </item>
  </channel>
</rss>

