slindsey3000
slindsey3000

Reputation: 4271

Print out all files in a folder and its subfolders on a Mac

I have a project with a lot of files under /app. There are also subfolders with files. How can I print(hard copy) these files all out without manually printing each one?

Note: Not the file names. I want to print(hard copy) the contents of all files under /app

Upvotes: 1

Views: 1882

Answers (1)

falsetru
falsetru

Reputation: 369064

Use find:

find /app

If you want print only directories, specify it with -type d (-type f to print files only):

find /app -type d

UPDATE

find /app -type f -print -exec cat {} \;

To get file hard copied, use lpr command:

find /app -type f -print -exec lpr {} \;

Upvotes: 3

Related Questions