In this case, I wanted to delete files from /tmp that weren't being removed automatically because the process that created them
took a long time to terminate. The following command deletes all files suffixed in .partd
, as well as any files in folders suffixed
by .partd
(what I wanted - note the -type f
flag means files only, so not directories) which were last accessed more than 30
minutes ago. The flag -amin +30
indicates last accessed more than 30 minutes ago, and -delete
means delete the files found.
find /tmp/*.partd -amin +30 -type f -delete