{"id":1070,"date":"2021-05-24T12:54:59","date_gmt":"2021-05-24T12:54:59","guid":{"rendered":"https:\/\/www.velaninfo.com\/rs\/?post_type=techtips&#038;p=1070"},"modified":"2021-05-24T12:54:59","modified_gmt":"2021-05-24T12:54:59","slug":"count-number-files-subdirectories-linux-command-line","status":"publish","type":"techtips","link":"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/","title":{"rendered":"How to Count Number of Files and Subdirectories inside the directory in Linux command line?"},"content":{"rendered":"<p>The simplest way to count number of files &amp; subdirectories in a parent directory using a \u201ctree\u201d command.<\/p>\n<p><strong>$ tree -iLf 1<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1071\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/05\/Untitled.png\" alt=\"Linux command line\" width=\"263\" height=\"638\" \/><\/p>\n<p><strong>$ tree -iLf 1 \/var\/log<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1072\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/05\/Untitled-2.png\" alt=\"simplest way to count number of files &amp; subdirectories \" width=\"383\" height=\"639\" \/><\/p>\n<p>You can use the <strong>tree man page <\/strong>for more useful options, configuration files and environment variables to use.<\/p>\n<p>At Velan, our server support engineers can help you with install Linux OS and help to identify the files &amp; folder counts on your server. If you are interested in our service, please fill the Quick connect form to<a href=\"https:\/\/www.velaninfo.com\/contact\"><strong> get in touch with us<\/strong><\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The simplest way to count number of files &amp; subdirectories in a parent directory using a \u201ctree\u201d command. $ tree -iLf 1 $ tree -iLf 1 \/var\/log You can use the tree man page for more useful options, configuration files and environment variables to use. At Velan, our server support engineers can help you with&#8230;<a class=\"continue-reading text-uppercase\" href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/\"> Continue Reading <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/themes\/velaninfo\/images\/reading_arw.png\" alt=\"Continue Reading\" width=\"16\" height=\"12\"\/><\/a><\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"tags":[],"class_list":["post-1070","techtips","type-techtips","status-publish","hentry","Categories_tech_tip-core","Categories_tech_tip-linux","Categories_tech_tip-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v19.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Count Number of Files and Subdirectories inside the directory in Linux command line| Velan<\/title>\n<meta name=\"description\" content=\"How to Count Number of Files and Subdirectories inside the directory in Linux command line\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Count Number of Files and Subdirectories inside the directory in Linux command line?\" \/>\n<meta property=\"og:description\" content=\"How to Count Number of Files and Subdirectories inside the directory in Linux command line\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/\" \/>\n<meta property=\"og:site_name\" content=\"Velan\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/05\/Untitled.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/count-number-files-subdirectories-linux-command-line\\\/\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/count-number-files-subdirectories-linux-command-line\\\/\",\"name\":\"How to Count Number of Files and Subdirectories inside the directory in Linux command line| Velan\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/count-number-files-subdirectories-linux-command-line\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/count-number-files-subdirectories-linux-command-line\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/Untitled.png\",\"datePublished\":\"2021-05-24T12:54:59+00:00\",\"description\":\"How to Count Number of Files and Subdirectories inside the directory in Linux command line\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/count-number-files-subdirectories-linux-command-line\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/count-number-files-subdirectories-linux-command-line\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/count-number-files-subdirectories-linux-command-line\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/Untitled.png\",\"contentUrl\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/Untitled.png\",\"width\":263,\"height\":638,\"caption\":\"Linux command line\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/count-number-files-subdirectories-linux-command-line\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tech Tips\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Count Number of Files and Subdirectories inside the directory in Linux command line?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\",\"name\":\"Velan\",\"description\":\"Velaninfo Services India Pvt Ltd\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Count Number of Files and Subdirectories inside the directory in Linux command line| Velan","description":"How to Count Number of Files and Subdirectories inside the directory in Linux command line","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/","og_locale":"en_US","og_type":"article","og_title":"How to Count Number of Files and Subdirectories inside the directory in Linux command line?","og_description":"How to Count Number of Files and Subdirectories inside the directory in Linux command line","og_url":"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/","og_site_name":"Velan","og_image":[{"url":"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/05\/Untitled.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/","url":"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/","name":"How to Count Number of Files and Subdirectories inside the directory in Linux command line| Velan","isPartOf":{"@id":"https:\/\/www.velaninfo.com\/rs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/#primaryimage"},"image":{"@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/#primaryimage"},"thumbnailUrl":"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/05\/Untitled.png","datePublished":"2021-05-24T12:54:59+00:00","description":"How to Count Number of Files and Subdirectories inside the directory in Linux command line","breadcrumb":{"@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/#primaryimage","url":"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/05\/Untitled.png","contentUrl":"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/05\/Untitled.png","width":263,"height":638,"caption":"Linux command line"},{"@type":"BreadcrumbList","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/count-number-files-subdirectories-linux-command-line\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.velaninfo.com\/rs\/"},{"@type":"ListItem","position":2,"name":"Tech Tips","item":"https:\/\/www.velaninfo.com\/rs\/techtips\/"},{"@type":"ListItem","position":3,"name":"How to Count Number of Files and Subdirectories inside the directory in Linux command line?"}]},{"@type":"WebSite","@id":"https:\/\/www.velaninfo.com\/rs\/#website","url":"https:\/\/www.velaninfo.com\/rs\/","name":"Velan","description":"Velaninfo Services India Pvt Ltd","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.velaninfo.com\/rs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/1070","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips"}],"about":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/types\/techtips"}],"author":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/comments?post=1070"}],"version-history":[{"count":1,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/1070\/revisions"}],"predecessor-version":[{"id":1073,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/1070\/revisions\/1073"}],"wp:attachment":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/media?parent=1070"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/tags?post=1070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}