I can do this:
$ find . . ./b ./b/foo ./c ./c/foo
And this:
$ find . -type f -exec cat {} \; This is in b. This is in c.
But not this:
$ find . -type f -exec cat > out.txt {} \;
Why not?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
find’s -exec argument runs the command you specify once for each file it finds. Try:
or:
xargs converts its standard input into command-line arguments for the command you specify. If you’re worried about embedded spaces in filenames, try: