Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.