How to Count Files and Directories on Linux

Posted by bvirt on Jan 12, 2021 1:03 AM EDT
https://buildvirtual.net; By Alex
Mail this story
Print this story

This tutorial covers how to count files and directories using Linux command line tools such as ls, wc and find and how to write a simple python script to count files and directories

Being able to count files in a directory on Linux, or directories themselves, is a useful admin task to know how to carry out. It may be that you are troubleshooting disk space issues or it could be that you are investigating a problem with log file rotation. There are many reasons why you may want to count files in a directory or to count the number of directories.

This article looks at some of the ways, and tools, you can use to count files when using Linux.

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Linux, Python

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.