Problem completing one of the interactive tutorials?
Moderator: drgrussell
-
medinita3586
Post
by medinita3586 » Sat Mar 14, 2015 7:20 pm
Hello, I was wondering why after I got this question solved, I am now not getting my -exec {} command to work. I created another smallc directory to try it and did this command: find /usr/include -name 's*' -size -25 -exec cp > {} /home/demo/smallc3 \; in different ways such as omitting the backwards slash or the semicolon an it keeps telling me : "/home/demo/smallc3 not a directory". I type the command in many different variations and still no positive output. What am I doing wrong?
Please help!!
Thank you in advance.

-
medinita3586
Post
by medinita3586 » Sat Mar 14, 2015 8:56 pm
Well, I guess is better when you don't get any replies with a solution to your problems, in that way you will be forced to find it on your own, so after playing for some time with the infamous and notorious -exec command, I finally came up with the right input, or at least I was able to make it work. So I entered:
find /usr/include -name 's*' -size -25 -exec cp {} /home/user/smallc2/ \;
and it worked! So I created a second directory named "smallc2" as practicing playground and the command did what it was supposed to do.
Now I believe I can keep moving on with the next tutorial.
Thank you.
Who is online
Users browsing this forum: No registered users and 2 guests