Subscribe to How-To Geek

Display a Count of Files in the Current Directory

From HowToGeek

Jump to: navigation, search

If you want to get a count of how many files are in a specific directory, you can do so easily with a simple command.

This command uses the -1 (that's a one) parameter of ls to display each file on a new line, and then the -l (lowercase L) parameter of the wordcount (wc) utility.

ls -1 | wc -l

Idea thanks to Adam Pash.

 

Our Friends
Getting Started
About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
Cmd.exe
Dpupdchk.exe Adobe_Updater.exe

All content on the How-To Geek Wiki is licensed under a Creative Commons License