<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1">
</HEAD>
<BODY>
yes xargs is your friend <IMG SRC="cid:1228465308.6745.0.camel@andy-desktop" ALIGN="middle" ALT=":)" BORDER="0"><BR>
<BR>
Will this work ?<BR>
<BR>
find /home -type f -wholename "*foo/bar/fred.txt" -exec rm -f {} \;<BR>
<BR>
That should run forced rm on each fie returned<BR>
<BR>
<BR>
<BR>
<BR>
On Thu, 2008-12-04 at 14:25 +0000, Chris Burton wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
> I seem to remember there's a switch for rm that makes this work, or is
> there
> some other syntax. Any ideas?
find /home -wholename "*foo/bar/fred.txt" -print0|xargs -p0 rm
The interractive part of it isn't very friendly but still there.
ChrisB.
p.s. there are probably better ways of doing it - as always :).
</PRE>
</BLOCKQUOTE>
</BODY>
<br />--
<br />This message has been scanned for viruses and
<br />dangerous content by
<a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
<br />believed to be clean.
</HTML>