SyntaxFix
Write A Post
Hire A Developer
Questions
Best way would be first of all find all files in directory then use AWK NR (Number of Records Variable)
below is the command :
find <directory path> -type f | awk 'END{print NR}'
example : - find /tmp/ -type f | awk 'END{print NR}'
find /tmp/ -type f | awk 'END{print NR}'