<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Count on Michael’s Domain</title><link>https://jeltsch.org/en/tags/count/</link><description>Recent content in Count on Michael’s Domain</description><generator>Hugo</generator><language>en-us</language><copyright>Copyright © 2002 - 2026 Michael Jeltsch.</copyright><lastBuildDate>Fri, 24 Jul 2026 00:18:18 +0300</lastBuildDate><atom:link href="https://jeltsch.org/en/tags/count/index.xml" rel="self" type="application/rss+xml"/><item><title>Counting files (list and word count, ls &amp; wc)</title><link>https://jeltsch.org/en/counting_files_list_and_word_count_ls_wc/</link><pubDate>Wed, 29 Apr 2020 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/counting_files_list_and_word_count_ls_wc/</guid><description>&lt;p&gt;How do you count the number of files in a directory? That becomes non-trivial if you have thousands of files in a directory. Your file manager chokes on counting them, especially if they are not local. On the Linux command line, this task is fast and easy:&lt;code&gt;ls | wc&lt;/code&gt;ls lists your files one per row and wc returns three numbers: lines, words and bytes. In the file counting example, lines and words are the same and equal the number of files in the directory. To count all files recursively in the directory tree &amp;ldquo;backcheck&amp;rdquo;:&lt;code&gt;find backcheck/ -type f | wc -l&lt;/code&gt;&lt;/p&gt;</description></item></channel></rss>