This example shows what type of files exist in the current directory:
knilluz@server:~/test$ file -b *.pkb | sort | uniq -c 213 ASCII C program text, with CRLF line terminators 2 ASCII C program text, with very long lines, with CRLF line terminators 6 ASCII English text, with CRLF line terminators 1 ASCII Pascal program text, with CRLF line terminators 6 ISO-8859 C program text, with CRLF line terminators 1 Lisp/Scheme program text
file -b *.pkb file: show file info (type of file). flag -b = show brief info (not the file name, only the info)
pipe to sort
pipe to uniq -c: -c count