{"id":651,"date":"2021-11-14T22:38:06","date_gmt":"2021-11-15T03:38:06","guid":{"rendered":"https:\/\/molecularsciences.org\/content\/?p=651"},"modified":"2024-02-08T08:41:35","modified_gmt":"2024-02-08T13:41:35","slug":"linux-counting-files-in-a-directory","status":"publish","type":"post","link":"https:\/\/molecularsciences.org\/content\/linux-counting-files-in-a-directory\/","title":{"rendered":"Linux Counting files in a directory"},"content":{"rendered":"\n<p>To count files in a directory<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ls directory | wc -l\n<\/code><\/pre>\n\n\n\n<p>To count all files in the directory and its subdirectories<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ls -R directory | wc -l<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To count files in a directory To count all files in the directory and its subdirectories<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-651","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/comments?post=651"}],"version-history":[{"count":1,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/651\/revisions"}],"predecessor-version":[{"id":652,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/651\/revisions\/652"}],"wp:attachment":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/media?parent=651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/categories?post=651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/tags?post=651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}