Write a command to find the number of files in a directory

ls -l|grep ‘^-‘|wc -l

Category: UNIX Interview Questions.