[K12OSN] Is there a command that can do....

Eric Harrison eharrison at mail.mesd.k12.or.us
Fri Feb 4 21:19:05 UTC 2005

Kevin Matson wrote:
>   We were running out of disk space on a set of our servers and the
> easiest thing to prune was the Mozilla cache files. I looked through the
> archives and found this,
> http://www.redhat.com/archives/k12osn/2003-September/msg00468.html, but
> it doesn't really work with our home directory structure and it seemed
> bulky.
>   I ended up settling on the following command run from our equivalent
> of /home/.
>       find . -path ./*/.mozilla/*/*.slt/Cache -exec rm -rf {} \;
>   Does anyone know of a way to run a find command to find the Cache
> folders, redirect or -exec that into a ls with a magic option (that I
> can't find) that lists the full path of each file inside of the Cache
> directory which could then be redirected into a rm command? Then it
> would be possible to clean out the contents of the offending directory
> without killing the directory itself.
> Thanks,
>   Kevin M.

If I understand correctly, this should do what you want:

      find . -path ./*/.mozilla/*/*.slt/Cache  -type f -exec rm -f {} \;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/k12osn/attachments/20050204/9091e6d8/attachment.sig>

More information about the K12OSN mailing list