AIX

ID #1151

Unix command to count number of files in a directory

find /top/directory -maxdepth 1 -type f | wc -l

I am not sure if find supports maxdepth option on AIX, but give it a shot .. If -maxdepth is not supported then

ls -l | sed -e '/^d.*$/d' | wc -l

subtract 1 from total for total line produced by ls -l

Tags: AIX, number of files

Related entries:

Last update: 2009-08-14 00:34
AuthorLuke Francis
Revision: 1.0

Digg it! Print this record Send FAQ to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this FAQ:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry