in reply to Re: how to get total numbers of files in a directory?
in thread how to get total numbers of files in a directory?

Watch out for dirctories ending in .txt
$ touch temp.txt $ mkdir dir.txt $ perl -le 'print scalar @{[<./*.txt>]}' 2
Try this:
$ perl -le 'print scalar @{[grep {-f} <./*.txt>]}' 1

--

flounder