Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have mounted an image and have used the find command to show all file types found on the image

~/mounted $ find . -type f -exec file {} \;

I know how to direct the output of the command to a .txt document but I cannot figure out how to copy the files I have found to another directory.

share|improve this question
What do you mean? All files? Or only those of a given type? If so, which type? – MariusMatutiae Oct 27 '13 at 14:46
up vote 2 down vote accepted

Instead of running the file utility use the same technique with cp

$ find . -type f -exec cp {} /destination/path \;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.