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?

有帮助吗?

解决方案

maybe you are looking for

$ find . -name '*.txt' -exec file {} +
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top