[wplug] find & -exec / -ok
Keir Josephson
kjoseph at stargate.net
Thu Sep 25 22:32:34 EDT 2003
On Thursday, September 25, 2003, at 04:15 PM, Vanco, Don wrote:
> 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.
>
> In both cases I get a response that tells me I am not providing an
> appropriate argument to either -ok or -exec.
>
> WTF?
How about this:
find . -name '*.ini' | xargs rm -i
-Keir
>
> (have tried in multiple shells)
>
> Don
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
More information about the wplug
mailing list