Results 1 to 2 of 2
First of all, was not sure if this was the right section because there are so many but hey it's a newbie question so this seemed right.
Now for my ...
- 10-24-2011 #1Just Joined!
- Join Date
- Oct 2011
- Posts
- 1
Need help with a command that I can't seem to get a hold off
First of all, was not sure if this was the right section because there are so many but hey it's a newbie question so this seemed right.
Now for my question:
So what I need is:
I need to search the /etc directory for anything with "passwd" in it. From those results I want the first 2 lines of what was in the found files.
Then it needs to go to the file /root/papier
What I thought would work:
Find /etc –name “*passwd*” –exec head {2} > /root/papier
But for some reason it gives this error: find: missing argument to -exec
I don't get it what needs to go with exec, looked at manpages but still can't figure it out
- 10-27-2011 #2


Reply With Quote
