Count files in a directory under UNIX

Note to self:

A few ways to count files in a directory under UNIX:

ls | wc -l

For recursive:

find . -print | wc -l

Using filename matching:

find . -name \*.jpg -print | wc -l

You must be logged in to comment on this post (damn those spammers)

Already registered?

Username

Password

forgot password?       register