{"id":2207,"date":"2021-09-23T10:10:25","date_gmt":"2021-09-23T10:10:25","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=2207"},"modified":"2021-09-23T10:31:04","modified_gmt":"2021-09-23T10:31:04","slug":"the-process-of-finding-and-deleting-the-empty-directories-in-unix","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/the-process-of-finding-and-deleting-the-empty-directories-in-unix\/","title":{"rendered":"The Process Of Finding And Deleting The Empty Directories In UNIX"},"content":{"rendered":"<p>The reason why it&#8217;s necessary to find out and delete the empty files in UNIX\/ LINUX operating system is that there may be problems with processing the multiple utilities which will also comprise of the rm command.<\/p>\n<h2>The steps given below shows you to find and delete the empty files and directories:<\/h2>\n<p>find . -type d -empty \u2014 for directory<br \/>\nfind . -type f -empty \u2014 for files<\/p>\n<h3>Delete the empty directories present under the \u2018current directory\u2019 with the use of the following command:<\/h3>\n<p>find . -type d -empty -exec rmdir {} \\;<\/p>\n<h3>In order to check the count of files that are in use by the users, the following command can be used:<\/h3>\n<p>wc -l find . -type f -empty | wc -l<br \/>\n&amp;<br \/>\nFor non-empty files count :<br \/>\nfind . -type f -not -empty | wc \u2013l<\/p>\n<h3>In all the examples mentioned above, replace \u2018.-dot\u2019 with the directory absolute path under which you would like to search the files.<\/h3>\n<p><strong>Note :<\/strong>\u00a0It is not advisable to remove empty directories from any system directories.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The reason why it&#8217;s necessary to find out and delete the empty files in UNIX\/ LINUX operating system is that there may be problems with processing the multiple utilities which will also comprise of the rm command. The steps given below shows you to find and delete the empty files and directories: find . -type [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-2207","post","type-post","status-publish","format-standard","hentry","category-web-hosting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The Process Of Finding And Deleting The Empty Directories In UNIX - OWS KB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ownwebservers.com\/kb\/the-process-of-finding-and-deleting-the-empty-directories-in-unix\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Process Of Finding And Deleting The Empty Directories In UNIX - OWS KB\" \/>\n<meta property=\"og:description\" content=\"The reason why it&#8217;s necessary to find out and delete the empty files in UNIX\/ LINUX operating system is that there may be problems with processing the multiple utilities which will also comprise of the rm command. The steps given below shows you to find and delete the empty files and directories: find . -type [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ownwebservers.com\/kb\/the-process-of-finding-and-deleting-the-empty-directories-in-unix\/\" \/>\n<meta property=\"og:site_name\" content=\"OWS KB\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-23T10:10:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-23T10:31:04+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"admin\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"OWS KB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/the-process-of-finding-and-deleting-the-empty-directories-in-unix\/#webpage\",\"url\":\"https:\/\/ownwebservers.com\/kb\/the-process-of-finding-and-deleting-the-empty-directories-in-unix\/\",\"name\":\"The Process Of Finding And Deleting The Empty Directories In UNIX - OWS KB\",\"isPartOf\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\"},\"datePublished\":\"2021-09-23T10:10:25+00:00\",\"dateModified\":\"2021-09-23T10:31:04+00:00\",\"author\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"breadcrumb\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/the-process-of-finding-and-deleting-the-empty-directories-in-unix\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ownwebservers.com\/kb\/the-process-of-finding-and-deleting-the-empty-directories-in-unix\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/the-process-of-finding-and-deleting-the-empty-directories-in-unix\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/the-process-of-finding-and-deleting-the-empty-directories-in-unix\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/the-process-of-finding-and-deleting-the-empty-directories-in-unix\/\",\"name\":\"The Process Of Finding And Deleting The Empty Directories In UNIX\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ownwebservers.com\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=2207"}],"version-history":[{"count":4,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2207\/revisions"}],"predecessor-version":[{"id":2212,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/2207\/revisions\/2212"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=2207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=2207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=2207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}