From: James Mohr <linux-newbie@jimmo.com>
To: Lx Newbie List <linux-newbie@vger.kernel.org>
Subject: Re: Question about "find -exec"
Date: Fri, 19 Jul 2002 07:52:38 +0200 [thread overview]
Message-ID: <200207190752.38161.linux-newbie@jimmo.com> (raw)
In-Reply-To: <3D36DDA3.FA0F073C@gmx.net>
On Thursday 18 July 2002 17:24, Oliver Ob wrote:
> I want to find and list all files with *.snm ending.
> find /mnt/c/ -name *.snm -exec ls
> does not work, the man page does tell me french fries.
>
> What am I missing?
You need to tell -exec which file to process. This is done with curly braces:
find /mnt/c/ -name *.snm -exec ls {} \;
However, without the -exec, your command will simply list the files anyway. I
am assuming that this is just an example, and you would want to do more than
just list the file name. You could exand this concept and use the curly
braces anywhere in the command. So, to move the files you find to another
directory you might have this:
find /mnt/c/ -name *.snm -exec mv {} /somewhere/else \;
Note that the \; tells the -exec that you are at the end of the command. For
details on using find with other commands, check this out:
http://www.linux-tutorial.info/cgi-bin/display.pl?32&0&0&0&3
Regards,
jimmo
--
---------------------------------------
"Be more concerned with your character than with your reputation. Your
character is what you really are while your reputation is merely what others
thing you are." -- John Wooden
---------------------------------------
Be sure to visit the Linux Tutorial: http://www.linux-tutorial.info
---------------------------------------
NOTE: All messages sent to me in response to my posts to newsgroups or forums
are subject to reposting.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2002-07-19 5:52 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-18 15:24 Question about "find -exec" Oliver Ob
2002-07-19 5:52 ` James Mohr [this message]
2002-07-24 7:07 ` Mike Castle
2002-07-24 16:07 ` James Mohr
2002-07-24 21:24 ` Partitioning problem Anshuman Rawat
2002-07-25 6:22 ` pa3gcu
2002-07-25 21:20 ` LI -lilo booting problem Chuck Gelm
2002-07-26 1:38 ` No Boot Problem Frank Roberts - SOTL
2002-07-26 3:53 ` Ray Olszewski
2002-07-26 12:44 ` Frank Roberts - SOTL
2002-07-26 16:57 ` Ray Olszewski
2002-07-27 1:23 ` Frank Roberts - SOTL
2002-07-26 20:28 ` Chuck Gelm
2002-07-26 6:10 ` LI -lilo booting problem pa3gcu
2002-07-26 21:19 ` Chuck Gelm
2002-07-27 8:08 ` pa3gcu
2002-07-26 21:21 ` Chuck Gelm
2002-07-26 23:57 ` Ray Olszewski
[not found] ` <3D444FC2.354744E5@gelm.net>
2002-07-28 21:15 ` Ray Olszewski
2002-07-29 1:21 ` Chuck Gelm
2002-07-29 21:01 ` Chuck Gelm
2002-07-29 23:11 ` Frank Roberts - SOTL
2002-08-02 10:07 ` ntp - how? Chuck Gelm
2002-08-02 15:31 ` pa3gcu
2002-08-02 16:36 ` Ray Olszewski
2002-08-02 20:28 ` Chuck Gelm
2002-08-02 21:42 ` Ray Olszewski
2002-08-02 22:25 ` Chuck Gelm
2002-07-26 6:28 ` LI -lilo booting problem Ray Olszewski
2002-07-26 17:04 ` ichi
2002-07-26 8:26 ` Ramzez
2002-07-19 9:16 ` Question about "find -exec" szonyi calin
-- strict thread matches above, loose matches on Subject: below --
2002-07-18 15:28 Petras, Martin [Ontario]
[not found] <Pine.LNX.4.21.0207250114250.2569-100000@hestia.rdrs.net>
2002-07-25 6:05 ` James Mohr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200207190752.38161.linux-newbie@jimmo.com \
--to=linux-newbie@jimmo.com \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox