How to Recursively List Out Files In a Directory in Linux

A few examples on using the Linux find command to list out all files matching a file type. The find command is on just about every Posix based OS, which is Linux, BSD, OSX. It’s a must to know to do sysadmin work.

List out all files in the directory you’re in and below

find . -name \* -print

List out all pdf files

find . -name \*.pdf -print

List out all txt files

find . -name \*.txt -print