HDFS commands II


HDFS Commands


                  Default Hadoop Ports are as follows:-


Hadoop Web UI
          https://localhost:50070


Set the replication of a file
                  Syntax: hdfs dfs -setrep -w 5 <filename>
$ hdfs dfs -setrep /sampDir/LogFile.log

In UI, you can see Replication of LogFiles.log is set to 5.


To see the number of blocks file is using
                Syntax: hdfs fsck -blocks <filename>
$ hdfs fsck -blocks /sampleDir/olympic_data.csv


To check the disk usage
                Syntax: hdfs dfs -du <dirname>/<filename>
$ hdfs dfs -du /sampleDir


To count the total number of lines, words and characters
             Syntax: hdfs dfs -cat <filename> | wc
$ hdfs dfs -cat /sampleDir/olympic_data.csv | wc


To count the total number of lines
           Syntax: hdfs dfs -cat <filename> | wc -l
                 $ hdfs dfs -cat /sampleDir/olympic_data.csv | wc -l


To count the total number of words
             Syntax: hdfs dfs -cat <filename> | wc -w
 $ hdfs dfs -cat /sampleDir/olympic_data.csv | wc -w


To count the total number of characters
             Syntax: hdfs dfs -cat <filename> | wc -c
 $ hdfs dfs -cat /sampleDir/olympic_data.csv | wc -c


To print statistics about the file/directory
             Syntax: hdfs dfs -stat <filename>/<directory>
             Syntax: hdfs dfs -stat "%F %u:%g %b %y %n" <filename>
$ hdfs dfs -stat /sampleDir/olympix_data.csv
$ hdfs dfs -stat "%F %u:%g  %b %y %n" /sampleDir/olympix_data.csv

file size in blocks (%b)
file type (%F)
group name of owner (%g)
name (%n)
block size (%o)
replication (%r)
user name of owner(%u),
modification date (%y, %Y). %y shows UTC date as “yyyy-MM-dd HH: mm: ss” 


Count the number of directories, files and bytes
             Syntax: hdfs dfs -count <filename>/<directory>
$ hdfs dfs -count /sampleDir/olympix_data.csv
$ hdfs dfs -count /sampleDir                             


To change the group of file/directory to root
              Syntax: hdfs dfs -chgrp root <filename>/<directory>
$ hdfs dfs -chgrp root /home


To change the owner of file/directory to root                                
        Syntax: hdfs dfs -chown root <filename>/<directory>
$ hdfs dfs -chown root /home


To change the permissions of files/directory
      There are three Classes – Owner, Group, Others.
  • The Owner is usually the creator of the files/folders.
  • The Group contains a group of users who share the same permissions and user privileges.
  • Others mean the general public.
       As for permissions, there are 3 types of actions that you can perform on a file/folder. You can either readwrite or execute.
  • Read – You can only view the file, but cannot modify the content of the file. 
  • Write – You can edit and modify the file. For Folders, you can delete and add the files into the folder.
  • Execute – Execute is mainly used when you need to run the file.
                                       
           Syntax : hdfs dfs -chmod [-R] <filename>/<directory>

With -R, make the change recursively through the directory. The user must be the owner of the file, or a super-user.
$ hdfs dfs -chmod 777 /home
"chmod 777” means making the file readable, writable and executable by everyone.


To get the cluster summary
$ hdfs dfsadmin -report


To know the status,change the status (safemode)


Comments

  1. After reading this blog i am very strong in this topic and helpful to develop my knowledge in hadoop.. thank you for sharing this blog to us

    big data training institute in velachery | hadoop training in chennai velachery | big data training in chennai velachery

    ReplyDelete
    Replies
    1. Hdfs Commands Ii >>>>> Download Now

      >>>>> Download Full

      Hdfs Commands Ii >>>>> Download LINK

      >>>>> Download Now

      Hdfs Commands Ii >>>>> Download Full

      >>>>> Download LINK vq

      Delete
  2. Big Data and Data Science Course Material. Avail 15 Day Free Trial! Learn Flume, Sqoop, Pig, Hive, MapReduce, Yarn & More. Get Certified By Experts! Hadoop Courses

    ReplyDelete
  3. Nice coading skill. i like your blog very much. if you are develop your knowledge in hadoop technologies refer this link


    Hadoop Training in Bangalore

    ReplyDelete
  4. That was a great message in my carrier, and It's wonderful commands like mind relaxes with understand words of knowledge by information's.
    Hadoop Training in Chennai

    ReplyDelete
  5. Thanks for your informative blog!!! Keep on updating your with such awesome information.


    Data Science Online Training|
    R Programming Online Training|
    Hadoop Online Training

    ReplyDelete
  6. That was a great message in my carrier, and It's wonderful commands like mind relaxes with understand words of knowledge by information's.

    Hadoop Training in Bangalore


    Hadoop Training in BTM Layout


    Hadoop Training in Marathahalli

    ReplyDelete
  7. http://www.brainbrushups.com/p/interview.html
    http://jobsandnewstoday.blogspot.in/2013/04/what-are-dis-advantages-of-manual-testing.html
    http://blog.hackapp.com/2014/02/now-we-have-android-decompiler-how-to.html
    http://snehalthakur.blogspot.in/2017/01/hdfs-commands.html
    http://androidsurya.blogspot.in/2011/10/android-copyright-symbol-in-string-xml.html
    http://tinywall.info/2012/06/deploy-android-application-from-eclipse.html
    http://scalaformachinelearning.com/2013/06/k-means-clustering-in-java.html
    http://automationtestingutilities.blogspot.in/2013/11/multi-browser-testing-using-selenium.html
    http://www.bigdataspeak.com/2013/04/reduce-emr-costs-use-spot-instances-and_27.html
    http://sejalbatham.blogspot.in/2016/10/the-tool-has-shed-its-java-dependency.html

    ReplyDelete
  8. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.

    Data Science Training in Chennai
    Data science training in bangalore
    Data science online training
    Data science training in pune
    Data science training in kalyan nagar

    ReplyDelete
  9. The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
    Devops training in Chennai
    Devops training in Bangalore
    Devops Online training
    Devops training in Pune

    ReplyDelete
  10. Thanks for your informative article, Your post helped me to understand the future and career prospects & Keep on updating your blog with such awesome article.
    Python training in pune
    AWS Training in chennai
    Python course in chennai

    ReplyDelete
  11. Great content thanks for sharing this informative blog which provided me technical information keep posting.
    DevOps online Training
    Best Devops Training institute in Chennai

    ReplyDelete
  12. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here
    Thank you. Your blog was very helpful and efficient For Me,Thanks for Sharing the information Regards..!!.. Big Data Hadoop Online Training Bangalore

    ReplyDelete
  13. Very good blog i really like it very informative and helpful thanks for sharing this blog.
    Hadoop Training
    Big data Hadoop Training

    ReplyDelete
  14. Thank you for your information. Please keep up the good work. Thank you.

    Hadoop training in Bangalore

    ReplyDelete
  15. Good Post. I like your blog. Thanks for Sharing
    Python Training in Noida

    ReplyDelete
  16. This information you provided in the blog that was really unique I love it!!, Thanks for sharing such a great blog..Keep posting.
    Big data hadoop training in mumbai
    Big data hadoop training in mumbai

    ReplyDelete
  17. Beautiful tutorial. Thank you for sharing, I went through your blog, it helped me a lot and I also received some new information.
    data science classes near bangalore|
    data science training in marathahalli|
    hadoop classes near bellandur|
    hadoop courses in kalyan nagar

    ReplyDelete
  18. Excellent information with unique content and it is very useful to know about the information based on blogs.

    salesforce Training in Bangalore
    uipath Training in Bangalore
    blueprism Training in Bangalore

    ReplyDelete
  19. Good post!Thank you so much for sharing this lovely article.It was so good to read and useful to upgrade my understanding...
    salesforce Training in Bangalore
    uipath Training in Bangalore
    blueprism Training in Bangalore

    ReplyDelete
  20. A very nice guide. I will definitely follow these tips. Thank you for sharing such detailed article. I am learning a lot from you.
    salesforce Training in Bangalore
    uipath Training in Bangalore
    blueprism Training in Bangalore

    ReplyDelete
  21. Thank you for providing such an awesome article and it is very useful blog for others to read.
    Big Data Training In Delhi

    ReplyDelete
  22. Geart Article.Really helpful to students who are taking Training on Big data and Hadoop.Thank you very much.

    ReplyDelete
  23. Digital marketing course in Noida - Digital Marketing is a broad term that includes advertising, promoting, and strengthening the online presence of businesses through digital platforms. Some of the digital tactics that fall under the umbrella of 'Digital Marketing' are digital advertising, email marketing, content marketing, pay-per-click, online brochures, and more. Unlike other offline marketing efforts, digital marketing allows getting accurate results in real time. For example, if you put an advertisement in the newspaper, it is nearly impossible to estimate how many people flipped to that page and paid attention to that ad. Digital marketing training in Noida

    ReplyDelete

  24. I went through your blog its really interesting and holds an informative content. Thanks for uploading such a wonderful blog. Data Science Course in Pune

    ReplyDelete
  25. This is amazing, very rare to find these type of blogs. Must say very well written.

    Hadoop Training

    ReplyDelete
  26. Nice information. Thanks for sharing content and such nice information for me. I hope you will share some more content about. Please keep sharing!

    Data ScienceTraining in Chennai

    ReplyDelete
  27. This comment has been removed by the author.

    ReplyDelete
  28. Pinnacle Learning Destination is a top MBA Coaching in Noida to provide better guidance and study material for the MBA Coaching. We have experienced and qualified faculty having an excellent command over teaching. Pinnacle boosts your CAT preparation approach and clarifies on your doubts faster and saves your time.

    ReplyDelete
  29. Thank you for sharing this wonderful information....keep sharing.

    Looking for best Data Science Certification in Bangalore. Prwatech offers big data certification courses with 100% Placement assistance to All Our Students. Also it provides placement assistance service in Bangalore for IT.

    Some training courses we offered are:
    Big Data Hadoop Online Training.
    Best Tableau Classroom Training in Pune.

    ReplyDelete
  30. Hi! This is my first visit to your blog! We are a team of volunteers and new initiatives in the same niche. Blog gave us useful information to work. You have done an amazing job!
    Data Science Training in Bangalore

    ReplyDelete
  31. Thank you for sharing the post it is very informative

    Best Hadoop Online Training Institute

    ReplyDelete
  32. These musings just knocked my socks off. I am happy you have posted this.
    data science course in noida

    ReplyDelete

  33. Awesome blog. I enjoyed reading your articles. This is truly a great read for me.

    Data Scientist Course in pune

    ReplyDelete
  34. Hi buddies, it is great written piece entirely defined, continue the good work constantly. ExcelR Data Science Courses

    ReplyDelete
  35. Fantastic blog extremely good well enjoyed with the incredible informative content which surely activates the learners to gain the enough knowledge. Which in turn makes the readers to explore themselves and involve deeply in to the subject. Wish you to dispatch the similar content successively in future as well.

    Data Science Training in Raipur

    ReplyDelete
  36. 이것은 당신이 제공하는 훌륭한 자원입니다. 이것은 여러분이 제공하는 매우 유용한 리소스이며 무료로 제공합니다. 양질의 유용한 리소스를 무료로 제공하는 것의 가치를 인식하는 웹 사이트를 보는 것이 정말 좋습니다.
    내 사이트를 방문하십시오.슬롯사이트
    많은 정보를 얻을 수 있습니다.

    ReplyDelete
  37. Very awesome!!! When I seek for this I found this website at the top of all blogs in search engine.
    data science course

    ReplyDelete
  38. I really thank you for the valuable info on this great subject and look forward to more great posts
    data scientist course in malaysia

    ReplyDelete
  39. OctaFx Review has been proven to be an extremely valuable investment tool. Traders can identify trading opportunities using action of market participants through charts, patterns and indicators.

    ReplyDelete
  40. An obligation of appreciation is for sharing significant information. Your internet based diaries were helpful. I request to invigorate the blog through little by little. Moreover, find your blog.
    A Homoeopathic approach to Skin Diseases
    Homoeopathy
    Drshwetahomoeopathy

    ReplyDelete
  41. Great Information sharing .. I am very happy to read this article .. thanks for giving us go through info.Fantastic nice. I appreciate this post.
    cyber security course

    ReplyDelete
  42. This article will present a closer look at data science courses that give you a comprehensive look at the field. So let's get started.

    data science course in borivali

    ReplyDelete

Post a Comment