PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Written By

How to count all files in a directory in Linux

How to count all files in a directory in Linux

To count all files in a directory in linux, simply cd to that directory and then run the following command:

ls | wc -l

Alternatively, you can select the directory by adding the directory to the command like so:

ls /var/css | wc -l

Here, /var/css is the directory you want to count the files in.

Counting all files in Window

To do the same thing on windows, use cd to move to the directory in question, and then run the following on command line:

dir

This will list all files and directories in a folder, and tell you how many files and directories exist.

Comments (0)

loading comments