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?
Try this:$ touch temp.txt $ mkdir dir.txt $ perl -le 'print scalar @{[<./*.txt>]}' 2
$ perl -le 'print scalar @{[grep {-f} <./*.txt>]}' 1
--
flounder
|
|---|