[wplug] find & -exec / -ok
Bob Schmertz
rschmertz at speakeasy.net
Thu Sep 25 18:19:44 EDT 2003
Vanco, Don incurred the wrath of Bob on Sep 25, by saying
>Argh. "find" is not behaving as expected.
>
>Scenario:
>USB hard drive (based Linux MP3 player) that spends time attached to a
>Windoze box. Windoze (through "folder settings") pollutes the drive with,
>among other things, a "Desktop.ini" file in every directory.
>
>I expect that this:
>find . -name *.ini -exec rm {} \;
>...will delete all this crap.
>Further, I expect that
>find . -name *.ini -ok rm {} \;
>....will do the same but prompt me for each deletion.
I'd try this before I went any further:
find . -name '*.ini' -exec rm '{}' \;
You don't need the quotes on the empty braces in t?csh, but you do need
them for {k,ba}?sh.
>
>In both cases I get a response that tells me I am not providing an
>appropriate argument to either -ok or -exec.
I'd have to say, though, that this is not the result I would expect.
--
Cheers,
Bob Schmertz
More information about the wplug
mailing list