Advanced

How to Count Files and Directories on Linux

Posted by bvirt on · Post a comment
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

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments

No comments yet. Be the first.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post