Re: [Linuxcommand-discuss] how to remove "mbox.ibex" files from all subfolders?
Brought to you by:
bshotts
|
From: William S. <bs...@pa...> - 2002-11-07 15:11:47
|
You could do it with the find command like so:
find ~/evolution -name mbox.ibex -exec rm {} \;
If you want to do this the hard way:
for i in $(find ~/evolution -name mbox.ibex); do
echo "Deleting $i"
rm $i
done
DISCLAMIER: I did not test this and it uses rm, so be careful!
||||| William Shotts, Jr. (bshotts AT panix DOT com)
||||| Be a Linux Commander! Follow me to http://linuxcommand.org
On 7 Nov 2002, Mertens Bram wrote:
> Hi,
>
> I'm not sure this requires a script, but I don't know how to this using
> pipes or i/O redirection...
>
> Any help with either solution will be greatly appreciated!
>
> I'm using Evolution 1.0.8 as my mail-client, all mail and data is store
> in ~/evolution/ and its subfolders.
>
> I would like a script or command that checks through ~/evolution
> recursively and deletes all files named "mbox.ibex".
>
> I can find the files with either:
> ls lh -R evolution/ | grep ibex
> or
> find evolution/ -name mbox.ibex
>
> (when I'm in my home dir off course...)
>
> Is there a way to pass these files to rm?
>
> I could copy the rm-commands I now used to delete them all into a script
> but then I would have to edit the script every a new subfolder is
> created, renamed or deleted...
>
> TIA
> --
> # Mertens Bram "M8ram" <bra...@li...> Linux User #249103 #
> # Red Hat Linux 7.3 KDE 3.0.0-10 kernel 2.4.18-3 i686 128MB RAM #
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: See the NEW Palm
> Tungsten T handheld. Power & Color in a compact size!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
> _______________________________________________
> Linuxcommand-discuss mailing list
> Lin...@li...
> https://lists.sourceforge.net/lists/listinfo/linuxcommand-discuss
>
|