user1458477
user1458477

Reputation: 15

file command + search directories and sub-directories

If file *.txt gets all text files from the current directory, how can I use it in order to get the text files from a specific directory and all its sub-directories?

Upvotes: 1

Views: 41

Answers (1)

ymonad
ymonad

Reputation: 12110

maybe you are looking for

$ find . -name '*.txt' -exec file {} +

Upvotes: 1

Related Questions