[Newark] Help with rm
Andy Goldschmidt
andy.goldschmidt at forlinux.co.uk
Fri Dec 5 08:22:31 UTC 2008
yes xargs is your friend :)
Will this work ?
find /home -type f -wholename "*foo/bar/fred.txt" -exec rm -f {} \;
That should run forced rm on each fie returned
On Thu, 2008-12-04 at 14:25 +0000, Chris Burton wrote:
> > 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 :).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/newark/attachments/20081205/4fc9015c/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stock_smiley-1.png
Type: image/png
Size: 873 bytes
Desc: not available
Url : http://mailman.lug.org.uk/pipermail/newark/attachments/20081205/4fc9015c/attachment.png
More information about the Newark
mailing list