[svlug] a way to remove executables from the /tmp directory

Scott Hess scott.hess at gmail.com
Fri Jul 15 21:03:22 PDT 2005

On 7/15/05, Jerry M. Howell II <jmhowell at jmhowell.com> wrote:
> On Fri, Jul 15, 2005 at 06:05:49PM -0700, Karsten M. Self wrote:
> >     man find:
> >        -perm +mode
> >               Any of the permission bits mode are set for the file.
>       Just incase it helps anyone I used the following and
>       it seemes to do the trick
>       find /tmp -type f -perm +111 -ls

Taking it to the next level:

find /tmp -type f -perm +111 -exec rm {} \;


find /tmp -type f -perm +111 | xargs -r rm

The latter is probably more efficient (spawns fewer rm subprocesses).


More information about the svlug mailing list